diff mbox series

[RFC,5/6] RISC-V: drop a needless check in print_isa_ext()

Message ID 20230508-strenuous-mustiness-412fdf2402b0@spud (mailing list archive)
State Changes Requested
Delegated to: Conor Dooley
Headers show
Series Deprecate riscv,isa DT property? | expand

Checks

Context Check Description
conchuod/tree_selection fail Failed to apply to next/pending-fixes or riscv/for-next

Commit Message

Conor Dooley May 8, 2023, 6:16 p.m. UTC
From: Conor Dooley <conor.dooley@microchip.com>

There'll always be elements in the array, even if none of the
optional bits of support are built into the kernel.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 arch/riscv/kernel/cpu.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
index c29643dca0f7..bc32207b7d86 100644
--- a/arch/riscv/kernel/cpu.c
+++ b/arch/riscv/kernel/cpu.c
@@ -176,15 +176,8 @@  arch_initcall(riscv_cpuinfo_init);
 #ifdef CONFIG_PROC_FS
 static void print_isa_ext(struct seq_file *f)
 {
-	int i = 0, arr_sz;
 
-	arr_sz = riscv_isa_extensions_count - 1;
-
-	/* No extension support available */
-	if (arr_sz <= 0)
-		return;
-
-	for (i = 0; i < arr_sz; i++) {
+	for (int i = 0; i < riscv_isa_extensions_count - 1; i++) {
 		if (!__riscv_isa_extension_available(NULL, riscv_isa_extensions[i].key))
 			continue;
 		if (riscv_isa_extensions[i].multi_letter)