[PATCH] mtd: parsers: bcm63xx: depend on MTD=y
From: Pengpeng Hou
Date: Thu Dec 03 2026 - 20:54:52 EST
The BCM63xx partition parser is a boolean suboption. Selecting it below
a modular MTD puts the parser in obj-y in a directory entered for
modules.
Restrict the parser to a built-in MTD core. Keep the existing platform
and compile-test dependencies.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: b597cc75f7fe ("mtd: parsers: bcm63xx: Do not make it modular")
Signed-off-by: Pengpeng Hou <hppiscas@xxxxxxx>
---
The original patch was prepared with Gemini. Codex assisted with this
review and revision (Assisted-by: gpt 5).
On x86-64 with COMPILE_TEST, Kconfig previously accepted the parser with
MTD=m. After the change it was disabled with MTD=m and remained
selectable with MTD=y. This was a configuration test; no target binary
was built.
drivers/mtd/parsers/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/parsers/Kconfig b/drivers/mtd/parsers/Kconfig
index da03ab6efe04c6ed16affabbdec2dd7fa7a3eb17..24302c37e32b76a0a5af22f03d5a6bac79b9493c 100644
--- a/drivers/mtd/parsers/Kconfig
+++ b/drivers/mtd/parsers/Kconfig
@@ -8,6 +8,7 @@ config MTD_BCM47XX_PARTS
config MTD_BCM63XX_PARTS
bool "BCM63XX CFE partitioning parser"
+ depends on MTD=y
depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
select CRC32
select MTD_PARSER_IMAGETAG
base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106