diff options
author | Alexei Starovoitov <ast@kernel.org> | 2021-12-01 21:10:25 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-12-02 22:18:34 +0300 |
commit | 8293eb995f349aed28006792cad4cb48091919dd (patch) | |
tree | 4dd7d85fab9a1a8cdf730380d590848523b2eec9 /include/linux/btf.h | |
parent | 74753e1462e77349525daf9eb60ea21ed92d3a97 (diff) | |
download | linux-8293eb995f349aed28006792cad4cb48091919dd.tar.xz |
bpf: Rename btf_member accessors.
Rename btf_member_bit_offset() and btf_member_bitfield_size() to
avoid conflicts with similarly named helpers in libbpf's btf.h.
Rename the kernel helpers, since libbpf helpers are part of uapi.
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211201181040.23337-3-alexei.starovoitov@gmail.com
Diffstat (limited to 'include/linux/btf.h')
-rw-r--r-- | include/linux/btf.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/btf.h b/include/linux/btf.h index 203eef993d76..956f70388f69 100644 --- a/include/linux/btf.h +++ b/include/linux/btf.h @@ -194,15 +194,15 @@ static inline bool btf_type_kflag(const struct btf_type *t) return BTF_INFO_KFLAG(t->info); } -static inline u32 btf_member_bit_offset(const struct btf_type *struct_type, - const struct btf_member *member) +static inline u32 __btf_member_bit_offset(const struct btf_type *struct_type, + const struct btf_member *member) { return btf_type_kflag(struct_type) ? BTF_MEMBER_BIT_OFFSET(member->offset) : member->offset; } -static inline u32 btf_member_bitfield_size(const struct btf_type *struct_type, - const struct btf_member *member) +static inline u32 __btf_member_bitfield_size(const struct btf_type *struct_type, + const struct btf_member *member) { return btf_type_kflag(struct_type) ? BTF_MEMBER_BITFIELD_SIZE(member->offset) : 0; |