]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mtd: rawnand: ndfc: add CONFIG_OF dependency
authorArnd Bergmann <arnd@arndb.de>
Thu, 18 Jun 2026 20:58:27 +0000 (22:58 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 29 Jun 2026 14:41:21 +0000 (16:41 +0200)
When compile-testing on x86 without CONFIG_OF, the ndfc driver produces
a harmless warning:

drivers/mtd/nand/raw/ndfc.c: In function 'ndfc_probe':
include/linux/dev_printk.h:154:31: error: 'len' is used uninitialized [-Werror=uninitialized]
  154 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                               ^
drivers/mtd/nand/raw/ndfc.c:196:17: note: in expansion of macro 'dev_err'
  196 |                 dev_err(&ofdev->dev, "unable read reg property (%d)\n", len);

Limit compile-testing to configurations with CONFIG_OF to trivially
avoid this. The driver will still be built in allmodconfig and many
randconfig builds.

Fixes: 4f2692a5383e ("mtd: rawnand: ndfc: use ioread32be/iowrite32be and allow COMPILE_TEST")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/Kconfig

index 64b8b99a3a682655fb24c6bd8480944ee42c6122..1f4053e531fd88e2c25df663e82b122e0dc09bab 100644 (file)
@@ -72,6 +72,7 @@ config MTD_NAND_AU1550
 config MTD_NAND_NDFC
        tristate "IBM/MCC 4xx NAND controller"
        depends on 44x || COMPILE_TEST
+       depends on OF
        select MTD_NAND_ECC_SW_HAMMING
        select MTD_NAND_ECC_SW_HAMMING_SMC
        help