[PATCH] samples/bpf:Remove unused variable

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

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

diff --git a/samples/bpf/xdp2skb_meta_kern.c b/samples/bpf/xdp2skb_meta_kern.c
index d5631014a176..af29a1bde4e4 100644
--- a/samples/bpf/xdp2skb_meta_kern.c
+++ b/samples/bpf/xdp2skb_meta_kern.c
@@ -32,7 +32,7 @@ SEC("xdp_mark")
 int _xdp_mark(struct xdp_md *ctx)
 {
 	struct meta_info *meta;
-	void *data, *data_end;
+	void *data;
 	int ret;
 
 	/* Reserve space in-front of data pointer for our meta info.
-- 
2.17.1
Re: [PATCH] samples/bpf:Remove unused variable
Posted by Geliang Tang 1 year, 4 months ago
On Wed, 2024-07-24 at 02:17 -0700, Zhu Jun wrote:
> samples/bpf:Remove unused variable

There is usually a space after the colon in the subject:

	"samples/bpf: Remove unused variable"

Also a subject prefix "bpf-next" is needed. You can add it when
formatting the patch:

	git format-patch -1 --subject-prefix='PATCH bpf-next'