Skip to contentSkip to conversation

test: selftests: remove unused various in sockmap_verdict_prog.c

PATCH Applied [email protected] 3 participants 3 messages Jan 13, 2022 – Jan 15, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: selftests: remove unused various in sockmap_verdict_prog.c

From: Menglong Dong <[email protected]>

'lport' and 'rport' in bpf_prog1() of sockmap_verdict_prog.c is not used, just remove them.

---
 tools/testing/selftests/bpf/progs/sockmap_parse_prog.c | 2 --
 1 file changed, 2 deletions(-)
tools/testing/selftests/bpf/progs/sockmap_parse_prog.c +0 -2
index 95d5b941bc1f..c9abfe3a11af 100644
@@ -7,8 +7,6 @@ int bpf_prog1(struct __sk_buff *skb)
 {
 	void *data_end = (void *)(long) skb->data_end;
 	void *data = (void *)(long) skb->data;
-	__u32 lport = skb->local_port;
-	__u32 rport = skb->remote_port;
 	__u8 *d = data;
 	int err;
 
Signature · 1 line
2.34.1
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · On Wed, Jan 12, 2022 at 7:17 PM <[email protected]> wrote:

From: Menglong Dong <[email protected]>

'lport' and 'rport' in bpf_prog1() of sockmap_verdict_prog.c is not used, just remove them.

Quoted 20 lines
---
 tools/testing/selftests/bpf/progs/sockmap_parse_prog.c | 2 --
 1 file changed, 2 deletions(-)
tools/testing/selftests/bpf/progs/sockmap_parse_prog.c +0 -3
index 95d5b941bc1f..c9abfe3a11af 100644
@@ -7,8 +7,6 @@ int bpf_prog1(struct __sk_buff *skb)
 {
        void *data_end = (void *)(long) skb->data_end;
        void *data = (void *)(long) skb->data;
-       __u32 lport = skb->local_port;
-       __u32 rport = skb->remote_port;
        __u8 *d = data;
        int err;
 
--

2.34.1

#2 lore raw
In reply to [email protected]
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:

Hello:

This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:

Quoted 8 lines · On Thu, 13 Jan 2022 11:16:58 +0800 you wrote:

From: Menglong Dong <[email protected]>

'lport' and 'rport' in bpf_prog1() of sockmap_verdict_prog.c is not used, just remove them.

[...]

Here is the summary with links:
- [bpf-next] test: selftests: remove unused various in sockmap_verdict_prog.c

    https://git.kernel.org/bpf/bpf-next/c/e80f2a0d1946

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html