[PATCH bpf-next 1/2] bpf: change var type of BTF_ID_LIST to static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux