Skip to contentSkip to conversation

riscv: make unexported items static

PATCH In review Ben Dooks 2 participants 2 messages Nov 22, 2023 RISC-V

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 riscv: make unexported items static

The relocation_hashtable and used_buckets_list are not used outside of the module.c file and therefore should be made static to avoid the follwoing sdparse warnings:

arch/riscv/kernel/module.c:48:19: warning: symbol 'relocation_hashtable' was not declared. Should it be static? arch/riscv/kernel/module.c:50:18: warning: symbol 'used_buckets_list' was not declared. Should it be static?

---
 arch/riscv/kernel/module.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/kernel/module.c +2 -2
index 56a8c78e9e21..b5109a3889c9 100644
@@ -45,9 +45,9 @@ void process_accumulated_relocations(struct module *me);
 int add_relocation_to_accumulate(struct module *me, int type, void *location,
 				 unsigned int hashtable_bits, Elf_Addr v);
 
-struct hlist_head *relocation_hashtable;
+static struct hlist_head *relocation_hashtable;
 
-struct list_head used_buckets_list;
+static struct list_head used_buckets_list;
 
 /*
  * The auipc+jalr instruction pair can reach any PC-relative offset
Signature · 7 lines
2.37.2.352.g3c44437643


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

The relocation_hashtable and used_buckets_list are not used outside of the module.c file and therefore should be made static to avoid the follwoing sdparse warnings:

arch/riscv/kernel/module.c:48:19: warning: symbol 'relocation_hashtable' was not declared. Should it be static? arch/riscv/kernel/module.c:50:18: warning: symbol 'used_buckets_list' was not declared. Should it be static?

Cheers,
Conor.

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