All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/Kconfig: fix dead conditions by removing dead options
@ 2026-07-29 21:05 Julian Braha
  2026-07-31 10:41 ` Arnd Bergmann
  2026-08-03  3:50 ` Jinjie Ruan
  0 siblings, 2 replies; 4+ messages in thread
From: Julian Braha @ 2026-07-29 21:05 UTC (permalink / raw)
  To: arnd
  Cc: tglx, xur, kees, peterz, thomas.weissschuh, ruanjinjie, gourry,
	lukas.bulwahn, ryan.roberts, jani.nikula, linux-kernel,
	Julian Braha

These two 'int' options:

ARCH_MMAP_RND_BITS_DEFAULT
ARCH_MMAP_RND_COMPAT_BITS_DEFAULT

are used directly as conditions for defaults. 'int' options should not be
used as conditions, because they will always evaluate to false.

Let's remove these options, because they are not used anywhere else.

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

Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
 arch/Kconfig | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 89ee0d1a3775..ad14831af348 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1235,13 +1235,9 @@ config ARCH_MMAP_RND_BITS_MIN
 config ARCH_MMAP_RND_BITS_MAX
 	int
 
-config ARCH_MMAP_RND_BITS_DEFAULT
-	int
-
 config ARCH_MMAP_RND_BITS
 	int "Number of bits to use for ASLR of mmap base address" if EXPERT
 	range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
-	default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
 	default ARCH_MMAP_RND_BITS_MIN
 	depends on HAVE_ARCH_MMAP_RND_BITS
 	help
@@ -1269,13 +1265,9 @@ config ARCH_MMAP_RND_COMPAT_BITS_MIN
 config ARCH_MMAP_RND_COMPAT_BITS_MAX
 	int
 
-config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
-	int
-
 config ARCH_MMAP_RND_COMPAT_BITS
 	int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
 	range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
-	default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
 	default ARCH_MMAP_RND_COMPAT_BITS_MIN
 	depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
 	help
-- 
2.55.0


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

end of thread, other threads:[~2026-08-21 10:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 21:05 [PATCH] arch/Kconfig: fix dead conditions by removing dead options Julian Braha
2026-07-31 10:41 ` Arnd Bergmann
2026-08-21 10:13   ` Julian Braha
2026-08-03  3:50 ` Jinjie Ruan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.