[PATCH] samples/bpf:Remove unused variables

Zhu Jun posted 1 patch 1 year, 5 months ago
samples/bpf/tcbpf1_kern.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] samples/bpf:Remove unused variables
Posted by Zhu Jun 1 year, 5 months ago
The variable is never referenced in the code, just remove them

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
 samples/bpf/tcbpf1_kern.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/samples/bpf/tcbpf1_kern.c b/samples/bpf/tcbpf1_kern.c
index e9356130f84e..dc4ba5fe9c73 100644
--- a/samples/bpf/tcbpf1_kern.c
+++ b/samples/bpf/tcbpf1_kern.c
@@ -56,7 +56,6 @@ SEC("classifier")
 int bpf_prog1(struct __sk_buff *skb)
 {
 	__u8 proto = load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol));
-	long *value;
 
 	if (proto == IPPROTO_TCP) {
 		set_ip_tos(skb, 8);
-- 
2.17.1
Re: [PATCH] samples/bpf:Remove unused variables
Posted by Yonghong Song 1 year, 5 months ago
On 8/20/24 1:17 AM, Zhu Jun wrote:
> The variable is never referenced in the code, just remove them
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>

Acked-by: Yonghong Song <yonghong.song@linux.dev>