[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200717184706.3477154-1-yhs@fb.com>
Date: Fri, 17 Jul 2020 11:47:06 -0700
From: Yonghong Song <yhs@...com>
To: <bpf@...r.kernel.org>, <netdev@...r.kernel.org>
CC: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jiri Olsa <jolsa@...nel.org>, <kernel-team@...com>
Subject: [PATCH bpf-next 1/2] bpf: change var type of BTF_ID_LIST to static
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@...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
Powered by blists - more mailing lists