Skip to contentSkip to conversation

riscv: dead code cleanup in kconfig for RISCV_PROBE_VECTOR_UNALIGNED_ACCESS

PATCH In review Julian Braha 3 participants 3 messages Mar 29 – May 22 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: dead code cleanup in kconfig for RISCV_PROBE_VECTOR_UNALIGNED_ACCESS

The same Kconfig statement 'depends on RISCV_ISA_V' appears twice for RISCV_PROBE_VECTOR_UNALIGNED_ACCESS. The first instance is in its choice menu, "Vector unaligned Accesses Support", making the second instance in its specific Kconfig definition dead code. I propose removing this second instance.

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

---
 arch/riscv/Kconfig | 1 -
 1 file changed, 1 deletion(-)
arch/riscv/Kconfig +0 -1
index 61a9d8d3ea64..35a2926494e1 100644
@@ -1004,7 +1004,6 @@ choice
 config RISCV_PROBE_VECTOR_UNALIGNED_ACCESS
 	bool "Probe speed of vector unaligned accesses"
 	select RISCV_VECTOR_MISALIGNED
-	depends on RISCV_ISA_V
 	help
 	  During boot, the kernel will run a series of tests to determine the
 	  speed of vector unaligned accesses if they are supported. This probing
Signature · 1 line
2.51.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Julian Braha

The same Kconfig statement 'depends on RISCV_ISA_V' appears twice for RISCV_PROBE_VECTOR_UNALIGNED_ACCESS. The first instance is in its choice menu, "Vector unaligned Accesses Support", making the second instance in its specific Kconfig definition dead code. I propose removing this second instance.

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

Thanks,
Jesse Taube

Quoted 19 lines
---
 arch/riscv/Kconfig | 1 -
 1 file changed, 1 deletion(-)
arch/riscv/Kconfig +0 -2
index 61a9d8d3ea64..35a2926494e1 100644
@@ -1004,7 +1004,6 @@ choice
 config RISCV_PROBE_VECTOR_UNALIGNED_ACCESS
        bool "Probe speed of vector unaligned accesses"
        select RISCV_VECTOR_MISALIGNED
-       depends on RISCV_ISA_V
        help
          During boot, the kernel will run a series of tests to determine the
          speed of vector unaligned accesses if they are supported. This probing
--

2.51.2

maintainer
#2 lore raw
In reply to Julian Braha
Quoted 9 lines · Julian Braha

The same Kconfig statement 'depends on RISCV_ISA_V' appears twice for RISCV_PROBE_VECTOR_UNALIGNED_ACCESS. The first instance is in its choice menu, "Vector unaligned Accesses Support", making the second instance in its specific Kconfig definition dead code. I propose removing this second instance.

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

Thanks, queued for v7.2.

- Paul