Skip to content

Commit b0843f8

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
riscv: Fix sparse warning in vendor_extensions/sifive.c
sparse reports the following warning: arch/riscv/kernel/vendor_extensions/sifive.c:11:33: sparse: sparse: symbol 'riscv_isa_vendor_ext_sifive' was not declared. Should it be static? So as this struct is only used in this file, make it static. Fixes: 2d147d7 ("riscv: Add SiFive xsfvqmaccdod and xsfvqmaccqoq vendor extensions") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/20250620-dev-alex-fix_sparse_sifive_v1-v1-1-efa3a6f93846@rivosinc.com Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 2f73c62 commit b0843f8

File tree

1 file changed

+1
-1
lines changed
  • arch/riscv/kernel/vendor_extensions

1 file changed

+1
-1
lines changed

arch/riscv/kernel/vendor_extensions/sifive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <linux/types.h>
99

1010
/* All SiFive vendor extensions supported in Linux */
11-
const struct riscv_isa_ext_data riscv_isa_vendor_ext_sifive[] = {
11+
static const struct riscv_isa_ext_data riscv_isa_vendor_ext_sifive[] = {
1212
__RISCV_ISA_EXT_DATA(xsfvfnrclipxfqf, RISCV_ISA_VENDOR_EXT_XSFVFNRCLIPXFQF),
1313
__RISCV_ISA_EXT_DATA(xsfvfwmaccqqq, RISCV_ISA_VENDOR_EXT_XSFVFWMACCQQQ),
1414
__RISCV_ISA_EXT_DATA(xsfvqmaccdod, RISCV_ISA_VENDOR_EXT_XSFVQMACCDOD),

0 commit comments

Comments
 (0)