]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
samples/bpf: Remove unused variables in tc_l2_redirect_kern.c
authorZhu Jun <zhujun2@cmss.chinamobile.com>
Mon, 11 Nov 2024 06:23:12 +0000 (22:23 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 13 Nov 2024 20:21:04 +0000 (12:21 -0800)
These variables are never referenced in the code, just remove them.

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241111062312.3541-1-zhujun2@cmss.chinamobile.com
samples/bpf/tc_l2_redirect_kern.c

index 0b48f7ddf521946f2e605a2d8f61606b67a78737..b19fa9b88fe0a2187bb69c684c27bc498c13db39 100644 (file)
@@ -63,8 +63,6 @@ int _l2_to_iptun_ingress_forward(struct __sk_buff *skb)
        void *data_end = (void *)(long)skb->data_end;
        int key = 0, *ifindex;
 
-       int ret;
-
        if (data + sizeof(*eth) > data_end)
                return TC_ACT_OK;
 
@@ -114,8 +112,6 @@ int _l2_to_iptun_ingress_redirect(struct __sk_buff *skb)
        void *data_end = (void *)(long)skb->data_end;
        int key = 0, *ifindex;
 
-       int ret;
-
        if (data + sizeof(*eth) > data_end)
                return TC_ACT_OK;