[PATCH] soc: apple: cleanup dead code in Kconfig

Julian Braha posted 1 patch 1 day, 3 hours ago
drivers/soc/apple/Kconfig | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
[PATCH] soc: apple: cleanup dead code in Kconfig
Posted by Julian Braha 1 day, 3 hours ago
There is already an 'if ARCH_APPLE || COMPILE_TEST' condition wrapping
these config options, making the 'depends on' statement for each a
duplicate dependency (dead code).

I propose leaving the outer 'if ARCH_APPLE || COMPILE_TEST...endif' and
removing the individual 'depends on' statement from each option.

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

Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
 drivers/soc/apple/Kconfig | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/soc/apple/Kconfig b/drivers/soc/apple/Kconfig
index d0ff32182a2b..e04a60722e0b 100644
--- a/drivers/soc/apple/Kconfig
+++ b/drivers/soc/apple/Kconfig
@@ -7,7 +7,7 @@ menu "Apple SoC drivers"
 config APPLE_MAILBOX
 	tristate "Apple SoC mailboxes"
 	depends on PM
-	depends on ARCH_APPLE || (64BIT && COMPILE_TEST)
+	depends on 64BIT
 	help
 	  Apple SoCs have various co-processors required for certain
 	  peripherals to work (NVMe, display controller, etc.). This
@@ -19,7 +19,6 @@ config APPLE_MAILBOX
 config APPLE_RTKIT
 	tristate "Apple RTKit co-processor IPC protocol"
 	depends on APPLE_MAILBOX
-	depends on ARCH_APPLE || COMPILE_TEST
 	help
 	  Apple SoCs such as the M1 come with various co-processors running
 	  their proprietary RTKit operating system. This option enables support
@@ -30,7 +29,6 @@ config APPLE_RTKIT
 
 config APPLE_SART
 	tristate "Apple SART DMA address filter"
-	depends on ARCH_APPLE || COMPILE_TEST
 	help
 	  Apple SART is a simple DMA address filter used on Apple SoCs such
 	  as the M1. It is usually required for the NVMe coprocessor which does
@@ -40,8 +38,7 @@ config APPLE_SART
 
 config APPLE_TUNABLE
 	tristate
-	depends on ARCH_APPLE || COMPILE_TEST
 
 endmenu
 
-endif
+endif # ARCH_APPLE || COMPILE_TEST
-- 
2.51.2