]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
riscv: replace select with dependency for visible RELOCATABLE
authorJulian Braha <julianbraha@gmail.com>
Sun, 3 May 2026 04:03:31 +0000 (05:03 +0100)
committerPaul Walmsley <pjw@kernel.org>
Sun, 7 Jun 2026 05:47:13 +0000 (23:47 -0600)
RANDOMIZE_BASE currently selects RELOCATABLE even though RELOCATABLE
is visible to users. Some other architectures, like x86, use 'depends on'
for RELOCATABLE in their definition of RANDOMIZE_BASE, so let's do the same
here.

This select-visible Kconfig misusage was detected by Kconfirm, a static
analysis tool for Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
Link: https://patch.msgid.link/20260503040331.71875-1-julianbraha@gmail.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/Kconfig

index a5e4f438e38145c58cddd4413faf7f9965b8d489..b1101c336c7c2bad033efc15f95285fd557289dd 100644 (file)
@@ -1164,7 +1164,7 @@ config RELOCATABLE
 
 config RANDOMIZE_BASE
         bool "Randomize the address of the kernel image"
-        select RELOCATABLE
+        depends on RELOCATABLE
         depends on MMU && 64BIT
         help
           Randomizes the virtual address at which the kernel image is