* [PATCH] samples/bpf:Remove unused variable
@ 2024-07-24 9:17 Zhu Jun
2024-07-24 9:47 ` Geliang Tang
0 siblings, 1 reply; 4+ messages in thread
From: Zhu Jun @ 2024-07-24 9:17 UTC (permalink / raw)
To: ast
Cc: daniel, davem, kuba, hawk, john.fastabend, andrii, martin.lau,
eddyz87, song, yonghong.song, kpsingh, sdf, haoluo, jolsa, netdev,
bpf, linux-kernel, Zhu Jun
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] samples/bpf:Remove unused variable
2024-07-24 9:17 [PATCH] samples/bpf:Remove " Zhu Jun
@ 2024-07-24 9:47 ` Geliang Tang
0 siblings, 0 replies; 4+ messages in thread
From: Geliang Tang @ 2024-07-24 9:47 UTC (permalink / raw)
To: Zhu Jun, ast
Cc: daniel, davem, kuba, hawk, john.fastabend, andrii, martin.lau,
eddyz87, song, yonghong.song, kpsingh, sdf, haoluo, jolsa, netdev,
bpf, linux-kernel
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'
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] samples/bpf: Remove unused variable
@ 2024-11-20 3:22 Zhu Jun
2024-11-25 22:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 4+ messages in thread
From: Zhu Jun @ 2024-11-20 3:22 UTC (permalink / raw)
To: martin.lau
Cc: song, eddyz87, yonghong.song, kpsingh, sdf, haoluo, jolsa, netdev,
bpf, linux-kernel, zhujun2
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>
---
samples/bpf/xdp2skb_meta_kern.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/samples/bpf/xdp2skb_meta_kern.c b/samples/bpf/xdp2skb_meta_kern.c
index af29a1bde..3c36c25d9 100644
--- a/samples/bpf/xdp2skb_meta_kern.c
+++ b/samples/bpf/xdp2skb_meta_kern.c
@@ -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;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] samples/bpf: Remove unused variable
2024-11-20 3:22 [PATCH] samples/bpf: Remove unused variable Zhu Jun
@ 2024-11-25 22:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-11-25 22:40 UTC (permalink / raw)
To: Zhu Jun
Cc: martin.lau, song, eddyz87, yonghong.song, kpsingh, sdf, haoluo,
jolsa, netdev, bpf, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Tue, 19 Nov 2024 19:22:41 -0800 you wrote:
> 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>
> ---
> samples/bpf/xdp2skb_meta_kern.c | 1 -
> 1 file changed, 1 deletion(-)
Here is the summary with links:
- samples/bpf: Remove unused variable
https://git.kernel.org/bpf/bpf-next/c/27802ca14cae
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-25 22:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-20 3:22 [PATCH] samples/bpf: Remove unused variable Zhu Jun
2024-11-25 22:40 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2024-07-24 9:17 [PATCH] samples/bpf:Remove " Zhu Jun
2024-07-24 9:47 ` Geliang Tang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox