Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: maps: fix dead select of MTD_CFI_BE_BYTE_SWAP
@ 2026-07-22  0:10 Julian Braha
  2026-07-22  7:42 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Julian Braha @ 2026-07-22  0:10 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: arnd, sean, andriy.shevchenko, rdunlap, linux-mtd, linux-kernel,
	Julian Braha

'select' does not work on config options in a 'choice', so currently it is
possible to enable MTD_PHYSMAP_IXP4XX without MTD_CFI_BE_BYTE_SWAP.

Let's replace the select with 'depends on'.

Note that, if we remove the select / dependency, the kernel will compile
with MTD_PHYSMAP_IXP4XX=y and MTD_CFI_BE_BYTE_SWAP=n so if it would be
better to remove the select, please advise as I do not have the hardware
to runtime test this.

This dead select was found by kconfirm, a static analysis tool for Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
 drivers/mtd/maps/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index f447902d707e..f300953cf9fa 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -100,8 +100,8 @@ config MTD_PHYSMAP_IXP4XX
 	bool "Intel IXP4xx OF-based physical memory map handling"
 	depends on MTD_PHYSMAP_OF
 	depends on ARM
+	depends on MTD_CFI_BE_BYTE_SWAP if CPU_BIG_ENDIAN
 	select MTD_COMPLEX_MAPPINGS
-	select MTD_CFI_BE_BYTE_SWAP if CPU_BIG_ENDIAN
 	default ARCH_IXP4XX
 	help
 	  This provides some extra DT physmap parsing for the Intel IXP4xx
-- 
2.54.0


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-22 14:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22  0:10 [PATCH] mtd: maps: fix dead select of MTD_CFI_BE_BYTE_SWAP Julian Braha
2026-07-22  7:42 ` Arnd Bergmann
2026-07-22 13:43   ` Julian Braha
2026-07-22 13:59     ` Arnd Bergmann
2026-07-22 14:38       ` Julian Braha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox