From adf120e1bedd9f27339cd773c6b474cc788f68f5 Mon Sep 17 00:00:00 2001 From: Zhu Jun Date: Tue, 19 Nov 2024 19:22:41 -0800 Subject: samples/bpf: Remove unused variable The variable is never referenced in the code, just remove it that this problem was discovered by reading code Signed-off-by: Zhu Jun Link: https://lore.kernel.org/r/20241120032241.5657-1-zhujun2@cmss.chinamobile.com Signed-off-by: Alexei Starovoitov --- samples/bpf/xdp2skb_meta_kern.c | 1 - 1 file changed, 1 deletion(-) (limited to 'samples') diff --git a/samples/bpf/xdp2skb_meta_kern.c b/samples/bpf/xdp2skb_meta_kern.c index af29a1bde4e4..3c36c25d9902 100644 --- a/samples/bpf/xdp2skb_meta_kern.c +++ b/samples/bpf/xdp2skb_meta_kern.c @@ -63,7 +63,6 @@ SEC("tc_mark") int _tc_mark(struct __sk_buff *ctx) { void *data = (void *)(unsigned long)ctx->data; - void *data_end = (void *)(unsigned long)ctx->data_end; void *data_meta = (void *)(unsigned long)ctx->data_meta; struct meta_info *meta = data_meta; -- cgit v1.2.3 From dff8470b99da095e1baafd01bdc21d9da05de821 Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Wed, 4 Dec 2024 09:34:16 -0800 Subject: samples/bpf: Pass TPROGS_USER_CFLAGS to libbpf makefile Before commit [1], the value of a variable TPROGS_USER_CFLAGS was passed to libbpf make command as a part of EXTRA_CFLAGS. This commit makes sure that the value of TPROGS_USER_CFLAGS is still passed to libbpf make command, in order to maintain backwards build scripts compatibility. [1] commit 5a6ea7022ff4 ("samples/bpf: Remove unnecessary -I flags from libbpf EXTRA_CFLAGS") Fixes: 5a6ea7022ff4 ("samples/bpf: Remove unnecessary -I flags from libbpf EXTRA_CFLAGS") Suggested-by: Viktor Malik Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Acked-by: Viktor Malik Link: https://lore.kernel.org/bpf/20241204173416.142240-1-eddyz87@gmail.com --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'samples') diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index bcf103a4c14f..18ad1fccf949 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -123,7 +123,7 @@ always-y += ibumad_kern.o always-y += hbm_out_kern.o always-y += hbm_edt_kern.o -TPROGS_CFLAGS = $(TPROGS_USER_CFLAGS) +COMMON_CFLAGS = $(TPROGS_USER_CFLAGS) TPROGS_LDFLAGS = $(TPROGS_USER_LDFLAGS) ifeq ($(ARCH), arm) -- cgit v1.2.3