]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
libbpf: Rename DECLARE_LIBBPF_OPTS into LIBBPF_OPTS
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 3 Nov 2021 22:08:34 +0000 (15:08 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 7 Nov 2021 16:34:22 +0000 (08:34 -0800)
commitbe80e9cdbca8ac66d09e0e24e0bd41d992362a0b
treef921e47f574fb5d37ef23addc687343887eb90e0
parentb8b5cb55f5d3f03cc1479a3768d68173a10359ad
libbpf: Rename DECLARE_LIBBPF_OPTS into LIBBPF_OPTS

It's confusing that libbpf-provided helper macro doesn't start with
LIBBPF. Also "declare" vs "define" is confusing terminology, I can never
remember and always have to look up previous examples.

Bypass both issues by renaming DECLARE_LIBBPF_OPTS into a short and
clean LIBBPF_OPTS. To avoid breaking existing code, provide:

  #define DECLARE_LIBBPF_OPTS LIBBPF_OPTS

in libbpf_legacy.h. We can decide later if we ever want to remove it or
we'll keep it forever because it doesn't add any maintainability burden.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Dave Marchevsky <davemarchevsky@fb.com>
Link: https://lore.kernel.org/bpf/20211103220845.2676888-2-andrii@kernel.org
tools/lib/bpf/bpf.h
tools/lib/bpf/libbpf_common.h
tools/lib/bpf/libbpf_legacy.h