Message ID | 20220714071811.187491-1-ben.dooks@sifive.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | RISC-V: Declare cpu_ops_spinwait in <asm/cpu_ops.h> | expand |
On 14/07/2022 08:18, Ben Dooks wrote: > 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? > > Signed-off-by: Ben Dooks <ben.dooks@sifive.com> Thanks Ben, clears the warning for me :) Reviewed-by: Conor Dooley <conor.dooley@microchip.com> > --- > arch/riscv/include/asm/cpu_ops.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/riscv/include/asm/cpu_ops.h b/arch/riscv/include/asm/cpu_ops.h > index 134590f1b843..aa128466c4d4 100644 > --- a/arch/riscv/include/asm/cpu_ops.h > +++ b/arch/riscv/include/asm/cpu_ops.h > @@ -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 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
diff --git a/arch/riscv/include/asm/cpu_ops.h b/arch/riscv/include/asm/cpu_ops.h index 134590f1b843..aa128466c4d4 100644 --- a/arch/riscv/include/asm/cpu_ops.h +++ b/arch/riscv/include/asm/cpu_ops.h @@ -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);
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? Signed-off-by: Ben Dooks <ben.dooks@sifive.com> --- arch/riscv/include/asm/cpu_ops.h | 1 + 1 file changed, 1 insertion(+)