Skip to contentSkip to conversation

RISC-V: Declare cpu_ops_spinwait in <asm/cpu_ops.h>

PATCH In review Ben Dooks 2 participants 2 messages Jul 14, 2022 RISC-V

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 RISC-V: Declare cpu_ops_spinwait in <asm/cpu_ops.h>

The cpu_ops_spinwait is used in a couple of places in arch/riscv and is causing a sparse warning due to no declaration. Add this to <asm/cpu_ops.h> with the others to fix the following:

arch/riscv/kernel/cpu_ops_spinwait.c:16:29: warning: symbol 'cpu_ops_spinwait' was not declared. Should it be static?

---
 arch/riscv/include/asm/cpu_ops.h | 1 +
 1 file changed, 1 insertion(+)
arch/riscv/include/asm/cpu_ops.h +1 -0
index 134590f1b843..aa128466c4d4 100644
@@ -38,6 +38,7 @@ struct cpu_operations {
 #endif
 };
 
+extern const struct cpu_operations cpu_ops_spinwait;
 extern const struct cpu_operations *cpu_ops[NR_CPUS];
 void __init cpu_set_ops(int cpu);
 
Signature · 7 lines
2.35.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Ben Dooks

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

The cpu_ops_spinwait is used in a couple of places in arch/riscv and is causing a sparse warning due to no declaration. Add this to <asm/cpu_ops.h> with the others to fix the following:

arch/riscv/kernel/cpu_ops_spinwait.c:16:29: warning: symbol 'cpu_ops_spinwait' was not declared. Should it be static?

Thanks Ben, clears the warning for me :)

Quoted 20 lines
---
  arch/riscv/include/asm/cpu_ops.h | 1 +
  1 file changed, 1 insertion(+)
arch/riscv/include/asm/cpu_ops.h +1 -1
index 134590f1b843..aa128466c4d4 100644
@@ -38,6 +38,7 @@ struct cpu_operations {
  #endif
  };
 
+extern const struct cpu_operations cpu_ops_spinwait;
  extern const struct cpu_operations *cpu_ops[NR_CPUS];
  void __init cpu_set_ops(int cpu);
 
--

2.35.1

Quoted 4 lines

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv