kallsyms: Remove function arch_get_kallsym()
Subsystems (3)
PATCH v2 1/1 kallsyms: Remove function arch_get_kallsym()
Fix the following sparse warning:
kernel/kallsyms.c:457:12: warning: symbol 'arch_get_kallsym' was not declared. Should it be static?
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
---
Changes in v2:
-Remove function arch_get_kallsym().
kernel/kallsyms.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-)
kernel/kallsyms.c +2 -16
@@ -454,24 +454,10 @@ struct kallsym_iter {int show_value; }; -int __weak arch_get_kallsym (unsigned int symnum,unsigned long *value, -char *type,char *name) -{ -return -EINVAL ; -} -static int get_ksymbol_arch (struct kallsym_iter *iter) { -int ret =arch_get_kallsym (iter->pos - kallsyms_num_syms, - &iter->value, &iter->type, - iter->name); - -if (ret <0 ) { - iter->pos_arch_end = iter->pos; -return 0 ; - } - -return 1 ; + iter->pos_arch_end = iter->pos; +return 0 ; }static int get_ksymbol_mod (struct kallsym_iter *iter)
Signature · 1 line
1.8.3.1
Quoted 19 lines · Jiapeng Chong
Fix the following sparse warning:
kernel/kallsyms.c:457:12: warning: symbol 'arch_get_kallsym' was not declared. Should it be static?Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>---
Changes in v2:
-Remove functionarch_get_kallsym().kernel/kallsyms.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-)kernel/kallsyms.c +0
-0
kernel/kallsyms.c struct kallsym_iter { · line 461
Quoted 8 lines
kernel/kallsyms.c +0
-5@@ -454,24 +454,10 @@ struct kallsym_iter {int show_value; }; -int __weak arch_get_kallsym (unsigned int symnum,unsigned long *value, -char *type,char *name) -{ -return -EINVAL ; -}
This is originally added by
d83212d5dd67 kallsyms, x86: Export addresses of PTI entry trampolines
by Alexander Shishkin.
The original patch has a x86 specific implementation but later it is removed.
Maybe Alexander Shishkin can take a look?
Quoted 19 lines
kernel/kallsyms.c +2
-11-static int get_ksymbol_arch (struct kallsym_iter *iter) { -int ret =arch_get_kallsym (iter->pos - kallsyms_num_syms, - &iter->value, &iter->type, - iter->name); - -if (ret <0 ) { - iter->pos_arch_end = iter->pos; -return 0 ; - } - -return 1 ; + iter->pos_arch_end = iter->pos; +return 0 ; }static int get_ksymbol_mod (struct kallsym_iter *iter)