All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jiri Olsa <jolsa@kernel.org>, <kernel-team@fb.com>
Subject: [PATCH bpf-next 1/2] bpf: change var type of BTF_ID_LIST to static
Date: Fri, 17 Jul 2020 11:47:06 -0700	[thread overview]
Message-ID: <20200717184706.3477154-1-yhs@fb.com> (raw)
In-Reply-To: <20200717184706.3476992-1-yhs@fb.com>

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


  reply	other threads:[~2020-07-17 18:47 UTC|newest]

Thread overview: 12+ 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 ` Yonghong Song [this message]
2020-07-17 19:21   ` [PATCH bpf-next 1/2] bpf: change var type of BTF_ID_LIST to static Jiri Olsa
2020-07-17 23:12   ` kernel test robot
2020-07-17 23:12     ` kernel test robot
2020-07-18  5:10     ` Yonghong Song
2020-07-18  5:10       ` Yonghong Song
2020-07-18  0:10   ` kernel test robot
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
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=20200717184706.3477154-1-yhs@fb.com \
    --to=yhs@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jolsa@kernel.org \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.