samples/bpf/tc_l2_redirect_kern.c | 4 ---- 1 file changed, 4 deletions(-)
These variables are never referenced in the code, just remove them
Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
samples/bpf/tc_l2_redirect_kern.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/samples/bpf/tc_l2_redirect_kern.c b/samples/bpf/tc_l2_redirect_kern.c
index fd2fa0004330..729657d77802 100644
--- a/samples/bpf/tc_l2_redirect_kern.c
+++ b/samples/bpf/tc_l2_redirect_kern.c
@@ -64,8 +64,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;
@@ -115,8 +113,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;
--
2.17.1
On Sun, Nov 10, 2024 at 10:23 PM Zhu Jun <zhujun2@cmss.chinamobile.com> wrote: > > These variables are never referenced in the code, just remove them > > Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> > --- > samples/bpf/tc_l2_redirect_kern.c | 4 ---- > 1 file changed, 4 deletions(-) > applied to bpf-next (but added file name to subject, so not sure if bot will pick this up) > diff --git a/samples/bpf/tc_l2_redirect_kern.c b/samples/bpf/tc_l2_redirect_kern.c > index fd2fa0004330..729657d77802 100644 > --- a/samples/bpf/tc_l2_redirect_kern.c > +++ b/samples/bpf/tc_l2_redirect_kern.c > @@ -64,8 +64,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; > > @@ -115,8 +113,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; > > -- > 2.17.1 > > > >
© 2016 - 2024 Red Hat, Inc.