[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ac65180a-c55f-4ee8-398e-64b0fcbaa0aa@fb.com>
Date: Thu, 22 Apr 2021 23:18:19 -0700
From: Yonghong Song <yhs@...com>
To: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>, <ast@...nel.org>
CC: <daniel@...earbox.net>, <andrii@...nel.org>, <kafai@...com>,
<songliubraving@...com>, <john.fastabend@...il.com>,
<kpsingh@...nel.org>, <linux-kernel@...r.kernel.org>,
<netdev@...r.kernel.org>, <bpf@...r.kernel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Subject: Re: [PATCH v2] kallsyms: Remove function arch_get_kallsym()
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@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.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)
>
Powered by blists - more mailing lists