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

Conor.Dooley at microchip.com Conor.Dooley at microchip.com
Thu Jul 14 00:39:58 PDT 2022


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 at sifive.com>

Thanks Ben, clears the warning for me :)

Reviewed-by: Conor Dooley <conor.dooley at 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 at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv



More information about the linux-riscv mailing list