From: Jiri Olsa <jolsa@redhat•com>
To: Yonghong Song <yhs@fb•com>
Cc: bpf@vger•kernel.org, netdev@vger•kernel.org,
Alexei Starovoitov <ast@kernel•org>,
Daniel Borkmann <daniel@iogearbox•net>,
Jiri Olsa <jolsa@kernel•org>,
kernel-team@fb•com
Subject: Re: [PATCH bpf-next 1/2] bpf: change var type of BTF_ID_LIST to static
Date: Fri, 17 Jul 2020 21:21:41 +0200 [thread overview]
Message-ID: <20200717192141.GF528602@krava> (raw)
In-Reply-To: <20200717184706.3477154-1-yhs@fb.com>
On Fri, Jul 17, 2020 at 11:47:06AM -0700, Yonghong Song wrote:
> The BTF_ID_LIST macro definition in btf_ids.h:
> #define BTF_ID_LIST(name) \
> __BTF_ID_LIST(name) \
> extern u32 name[];
>
> The variable defined in __BTF_ID_LIST has
> ".local" directive, which means the variable
> is only available in the current file.
> So change the scope of "name" in the declaration
> from "extern" to "static".
>
> Signed-off-by: Yonghong Song <yhs@fb•com>
Acked-by: Jiri Olsa <jolsa@redhat•com>
thanks,
jirka
> ---
> include/linux/btf_ids.h | 2 +-
> tools/include/linux/btf_ids.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h
> index 1cdb56950ffe..cebc9a655959 100644
> --- a/include/linux/btf_ids.h
> +++ b/include/linux/btf_ids.h
> @@ -66,7 +66,7 @@ asm( \
>
> #define BTF_ID_LIST(name) \
> __BTF_ID_LIST(name) \
> -extern u32 name[];
> +static u32 name[];
>
> /*
> * The BTF_ID_UNUSED macro defines 4 zero bytes.
> diff --git a/tools/include/linux/btf_ids.h b/tools/include/linux/btf_ids.h
> index fe019774f8a7..b870776201e5 100644
> --- a/tools/include/linux/btf_ids.h
> +++ b/tools/include/linux/btf_ids.h
> @@ -64,7 +64,7 @@ asm( \
>
> #define BTF_ID_LIST(name) \
> __BTF_ID_LIST(name) \
> -extern u32 name[];
> +static u32 name[];
>
> /*
> * The BTF_ID_UNUSED macro defines 4 zero bytes.
> --
> 2.24.1
>
next prev parent reply other threads:[~2020-07-17 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 18:47 [PATCH bpf-next 0/2] compute bpf_skc_to_*() helper socket btf ids at build time Yonghong Song
2020-07-17 18:47 ` [PATCH bpf-next 1/2] bpf: change var type of BTF_ID_LIST to static Yonghong Song
2020-07-17 19:21 ` Jiri Olsa [this message]
2020-07-17 23:12 ` kernel test robot
2020-07-18 5:10 ` Yonghong Song
2020-07-18 0:10 ` kernel test robot
2020-07-17 18:47 ` [PATCH bpf-next 2/2] bpf: compute bpf_skc_to_*() helper socket btf ids at build time Yonghong Song
2020-07-18 0:33 ` kernel test robot
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=20200717192141.GF528602@krava \
--to=jolsa@redhat$(echo .)com \
--cc=ast@kernel$(echo .)org \
--cc=bpf@vger$(echo .)kernel.org \
--cc=daniel@iogearbox$(echo .)net \
--cc=jolsa@kernel$(echo .)org \
--cc=kernel-team@fb$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=yhs@fb$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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