From: Julian Braha <julianbraha@gmail.com>
To: arnd@arndb.de
Cc: tglx@kernel.org, xur@google.com, kees@kernel.org,
peterz@infradead.org, thomas.weissschuh@linutronix.de,
ruanjinjie@huawei.com, gourry@gourry.net,
lukas.bulwahn@redhat.com, ryan.roberts@arm.com,
jani.nikula@linux.intel.com, linux-kernel@vger.kernel.org,
Julian Braha <julianbraha@gmail.com>
Subject: [PATCH] arch/Kconfig: fix dead conditions by removing dead options
Date: Wed, 29 Jul 2026 22:05:46 +0100 [thread overview]
Message-ID: <20260729210546.394392-1-julianbraha@gmail.com> (raw)
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
next reply other threads:[~2026-07-29 21:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 21:05 Julian Braha [this message]
2026-07-31 10:41 ` [PATCH] arch/Kconfig: fix dead conditions by removing dead options Arnd Bergmann
2026-08-21 10:13 ` Julian Braha
2026-08-03 3:50 ` Jinjie Ruan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260729210546.394392-1-julianbraha@gmail.com \
--to=julianbraha@gmail.com \
--cc=arnd@arndb.de \
--cc=gourry@gourry.net \
--cc=jani.nikula@linux.intel.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@redhat.com \
--cc=peterz@infradead.org \
--cc=ruanjinjie@huawei.com \
--cc=ryan.roberts@arm.com \
--cc=tglx@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=xur@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.