[PATCH v1] RISC-V: include cpufeature.h in cpufeature.c

Conor Dooley conor at kernel.org
Thu Apr 20 11:30:16 PDT 2023


From: Conor Dooley <conor.dooley at microchip.com>

Automation complains:
warning: symbol '__pcpu_scope_misaligned_access_speed' was not declared. Should it be static?

cpufeature.c doesn't actually include the header of the same name, as it
had not previously used anything from it.
The per-cpu variable is declared there, so include it to silence the
complaints.

Fixes: 62a31d6e38bd ("RISC-V: hwprobe: Support probing of misaligned access performance")
Signed-off-by: Conor Dooley <conor.dooley at microchip.com>
---
CC: Evan Green <evan at rivosinc.com>
CC: Palmer Dabbelt <palmer at dabbelt.com>
CC: Paul Walmsley <paul.walmsley at sifive.com>
CC: linux-riscv at lists.infradead.org
---
 arch/riscv/kernel/cpufeature.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 52585e088873..00f9f57a8566 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -14,6 +14,7 @@
 #include <linux/of.h>
 #include <asm/alternative.h>
 #include <asm/cacheflush.h>
+#include <asm/cpufeature.h>
 #include <asm/hwcap.h>
 #include <asm/patch.h>
 #include <asm/processor.h>
-- 
2.39.2




More information about the linux-riscv mailing list