bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] kallsyms: Remove function arch_get_kallsym()
@ 2021-04-22  9:49 Jiapeng Chong
  2021-04-23  6:18 ` Yonghong Song
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-04-22  9:49 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>
---
Changes in v2:
  -Remove function arch_get_kallsym().

 kernel/kallsyms.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 8043a90..49c4268 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -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)
-- 
1.8.3.1


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

end of thread, other threads:[~2021-04-23  6:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22  9:49 [PATCH v2] kallsyms: Remove function arch_get_kallsym() Jiapeng Chong
2021-04-23  6:18 ` Yonghong Song

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).