diff mbox series

[bpf-next,v2] bpf: Clean up Makefile of bpf preload

Message ID 20220308044339.458876-1-ytcoode@gmail.com (mailing list archive)
State Superseded
Delegated to: BPF
Headers show
Series [bpf-next,v2] bpf: Clean up Makefile of bpf preload | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for bpf-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-next-PR success PR summary
bpf/vmtest-bpf-next success VM_Test

Commit Message

Yuntao Wang March 8, 2022, 4:43 a.m. UTC
The trailing slash in LIBBPF_SRCS is redundant, it should be removed.

But to simplify the Makefile further, we can set LIBBPF_INCLUDE to
$(srctree)/tools/lib directly, thus the LIBBPF_SRCS variable is unused
and can be removed.

Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
---
v1->v2: get rid of LIBBPF_SRCS

 kernel/bpf/preload/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Andrii Nakryiko March 8, 2022, 6:21 a.m. UTC | #1
On Mon, Mar 7, 2022 at 8:45 PM Yuntao Wang <ytcoode@gmail.com> wrote:
>
> The trailing slash in LIBBPF_SRCS is redundant, it should be removed.
>
> But to simplify the Makefile further, we can set LIBBPF_INCLUDE to
> $(srctree)/tools/lib directly, thus the LIBBPF_SRCS variable is unused
> and can be removed.
>
> Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
> ---
> v1->v2: get rid of LIBBPF_SRCS
>

Oops, didn't notice v2. But I ended up pushing the same thing in your
v1, hope that's fine.

>  kernel/bpf/preload/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/bpf/preload/Makefile b/kernel/bpf/preload/Makefile
> index 167534e3b0b4..7284782981bf 100644
> --- a/kernel/bpf/preload/Makefile
> +++ b/kernel/bpf/preload/Makefile
> @@ -1,7 +1,6 @@
>  # SPDX-License-Identifier: GPL-2.0
>
> -LIBBPF_SRCS = $(srctree)/tools/lib/bpf/
> -LIBBPF_INCLUDE = $(LIBBPF_SRCS)/..
> +LIBBPF_INCLUDE = $(srctree)/tools/lib
>
>  obj-$(CONFIG_BPF_PRELOAD_UMD) += bpf_preload.o
>  CFLAGS_bpf_preload_kern.o += -I $(LIBBPF_INCLUDE)
> --
> 2.35.1
>
diff mbox series

Patch

diff --git a/kernel/bpf/preload/Makefile b/kernel/bpf/preload/Makefile
index 167534e3b0b4..7284782981bf 100644
--- a/kernel/bpf/preload/Makefile
+++ b/kernel/bpf/preload/Makefile
@@ -1,7 +1,6 @@ 
 # SPDX-License-Identifier: GPL-2.0
 
-LIBBPF_SRCS = $(srctree)/tools/lib/bpf/
-LIBBPF_INCLUDE = $(LIBBPF_SRCS)/..
+LIBBPF_INCLUDE = $(srctree)/tools/lib
 
 obj-$(CONFIG_BPF_PRELOAD_UMD) += bpf_preload.o
 CFLAGS_bpf_preload_kern.o += -I $(LIBBPF_INCLUDE)