Skip to content

Commit 87df2b5

Browse files
ConchuODpalmer-dabbelt
authored andcommitted
riscv: ensure cpu_ops_sbi is declared
Sparse complains that cpu_ops_sbi is used undeclared: arch/riscv/kernel/cpu_ops_sbi.c:17:29: warning: symbol 'cpu_ops_sbi' was not declared. Should it be static? Fix the warning by adding cpu_ops_sbi to cpu_ops_sbi.h & including that where used. Signed-off-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent e4aa991 commit 87df2b5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

arch/riscv/include/asm/cpu_ops_sbi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include <linux/sched.h>
1111
#include <linux/threads.h>
1212

13+
extern const struct cpu_operations cpu_ops_sbi;
14+
1315
/**
1416
* struct sbi_hart_boot_data - Hart specific boot used during booting and
1517
* cpu hotplug.

arch/riscv/kernel/cpu_ops.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/string.h>
1010
#include <linux/sched.h>
1111
#include <asm/cpu_ops.h>
12+
#include <asm/cpu_ops_sbi.h>
1213
#include <asm/sbi.h>
1314
#include <asm/smp.h>
1415

0 commit comments

Comments
 (0)