samples/bpf: Remove unused variable
authorZhu Jun <zhujun2@cmss.chinamobile.com>
Wed, 20 Nov 2024 03:22:41 +0000 (19:22 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 2 Dec 2024 16:41:17 +0000 (08:41 -0800)
The variable is never referenced in the code, just remove it
that this problem was discovered by reading code

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20241120032241.5657-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/xdp2skb_meta_kern.c

index af29a1bde4e44fb12e8f12ad9feeae08f2779c64..3c36c25d99026c9523745337847c1c51f0c30d00 100644 (file)
@@ -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;