linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kallsyms: make arch_get_kallsym() static
@ 2022-07-21 15:10 Ben Dooks
  2022-07-21 15:22 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Dooks @ 2022-07-21 15:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ben Dooks

The arch_get_kallsym() function is not used anywhere in the kernel
now, so it should at-least be static or just be removed as there
are no users. Making it static fixes the following sparse warning:

kernel/kallsyms.c:590:12: warning: symbol 'arch_get_kallsym' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
 kernel/kallsyms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index fbdf8d3279ac..14922fb21f7b 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -587,7 +587,7 @@ struct kallsym_iter {
 	int show_value;
 };
 
-int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
+static int arch_get_kallsym(unsigned int symnum, unsigned long *value,
 			    char *type, char *name)
 {
 	return -EINVAL;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] kallsyms: make arch_get_kallsym static
@ 2021-02-25  7:08 Jiapeng Chong
  2021-02-25 10:20 ` kernel test robot
  2021-02-25 16:56 ` Christoph Hellwig
  0 siblings, 2 replies; 6+ messages in thread
From: Jiapeng Chong @ 2021-02-25  7:08 UTC (permalink / raw)
  To: ast
  Cc: daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
	kpsingh, linux-kernel, netdev, bpf, 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 <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 kernel/kallsyms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 8043a90..a26f98e 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -454,7 +454,7 @@ struct kallsym_iter {
 	int show_value;
 };
 
-int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
+static int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
 			    char *type, char *name)
 {
 	return -EINVAL;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-22  8:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 15:10 [PATCH] kallsyms: make arch_get_kallsym() static Ben Dooks
2022-07-21 15:22 ` Christoph Hellwig
2022-07-22  8:01   ` Ben Dooks
  -- strict thread matches above, loose matches on Subject: below --
2021-02-25  7:08 [PATCH] kallsyms: make arch_get_kallsym static Jiapeng Chong
2021-02-25 10:20 ` kernel test robot
2021-02-25 16:56 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).