From: Yonghong Song <yhs@fb.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, <ast@kernel.org>
Cc: <daniel@iogearbox.net>, <andrii@kernel.org>, <kafai@fb.com>,
<songliubraving@fb.com>, <john.fastabend@gmail.com>,
<kpsingh@kernel.org>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: Re: [PATCH v2] kallsyms: Remove function arch_get_kallsym()
Date: Thu, 22 Apr 2021 23:18:19 -0700 [thread overview]
Message-ID: <ac65180a-c55f-4ee8-398e-64b0fcbaa0aa@fb.com> (raw)
In-Reply-To: <1619084946-28509-1-git-send-email-jiapeng.chong@linux.alibaba.com>
On 4/22/21 2:49 AM, Jiapeng Chong wrote:
> 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;
> -}
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?
> -
> 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)
>
prev parent reply other threads:[~2021-04-23 6:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 9:49 [PATCH v2] kallsyms: Remove function arch_get_kallsym() Jiapeng Chong
2021-04-23 6:18 ` Yonghong Song [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac65180a-c55f-4ee8-398e-64b0fcbaa0aa@fb.com \
--to=yhs@fb.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox