* [PATCH] mtd: rawnand: ndfc: add CONFIG_OF dependency
@ 2026-06-18 20:58 Arnd Bergmann
2026-06-19 17:47 ` Rosen Penev
2026-06-29 14:44 ` Miquel Raynal
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2026-06-18 20:58 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Rosen Penev
Cc: Arnd Bergmann, Chris Down, Krzysztof Kozlowski, Binbin Zhou,
linux-mtd, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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>
---
We may also want to change the of_get_property() stub function to
initialize *len.
---
drivers/mtd/nand/raw/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 64b8b99a3a68..1f4053e531fd 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -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
--
2.39.5
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mtd: rawnand: ndfc: add CONFIG_OF dependency
2026-06-18 20:58 [PATCH] mtd: rawnand: ndfc: add CONFIG_OF dependency Arnd Bergmann
@ 2026-06-19 17:47 ` Rosen Penev
2026-06-29 14:44 ` Miquel Raynal
1 sibling, 0 replies; 3+ messages in thread
From: Rosen Penev @ 2026-06-19 17:47 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Arnd Bergmann, Chris Down, Krzysztof Kozlowski, Binbin Zhou,
linux-mtd, linux-kernel
On Thu, Jun 18, 2026 at 1:58 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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")
Might also want to add
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606160153.ppeRdEL0-lkp@intel.com/
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Rosen Penev <rosenp@gmail.com>
> ---
> We may also want to change the of_get_property() stub function to
> initialize *len.
> ---
> drivers/mtd/nand/raw/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> index 64b8b99a3a68..1f4053e531fd 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -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
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mtd: rawnand: ndfc: add CONFIG_OF dependency
2026-06-18 20:58 [PATCH] mtd: rawnand: ndfc: add CONFIG_OF dependency Arnd Bergmann
2026-06-19 17:47 ` Rosen Penev
@ 2026-06-29 14:44 ` Miquel Raynal
1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2026-06-29 14:44 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Rosen Penev, Arnd Bergmann
Cc: Arnd Bergmann, Chris Down, Krzysztof Kozlowski, Binbin Zhou,
linux-mtd, linux-kernel
On Thu, 18 Jun 2026 22:58:27 +0200, Arnd Bergmann wrote:
> 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);
>
> [...]
Applied to mtd/fixes, thanks!
[1/1] mtd: rawnand: ndfc: add CONFIG_OF dependency
commit: 97f9e509d839f7e5b9a32105ae322e5223c86786
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-29 14:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-18 20:58 [PATCH] mtd: rawnand: ndfc: add CONFIG_OF dependency Arnd Bergmann
2026-06-19 17:47 ` Rosen Penev
2026-06-29 14:44 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox