Skip to contentSkip to conversation

selftests/bpf: remove unused variable from bpf_sk_assign test

PATCH Applied Eyal Birger 2 participants 2 messages Mar 29, 2022 – Apr 1, 2022

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

PATCH 1/1 selftests/bpf: remove unused variable from bpf_sk_assign test

Was never used in bpf_sk_assign_test(), and was removed from handle_{tcp,udp} in commit 0b9ad56b1ea6
("selftests/bpf: Use SOCKMAP for server sockets in bpf_sk_assign test")

Fixes 0b9ad56b1ea6 ("selftests/bpf: Use SOCKMAP for server sockets in bpf_sk_assign test")
---
 tools/testing/selftests/bpf/progs/test_sk_assign.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
tools/testing/selftests/bpf/progs/test_sk_assign.c +1 -3
index 02f79356d5eb..98c6493d9b91 100644
@@ -89,7 +89,6 @@ get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp)
 static inline int
 handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4)
 {
-	struct bpf_sock_tuple ln = {0};
 	struct bpf_sock *sk;
 	const int zero = 0;
 	size_t tuple_len;
@@ -121,7 +120,6 @@ handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4)
 static inline int
 handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4)
 {
-	struct bpf_sock_tuple ln = {0};
 	struct bpf_sock *sk;
 	const int zero = 0;
 	size_t tuple_len;
@@ -161,7 +159,7 @@ handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4)
 SEC("tc")
 int bpf_sk_assign_test(struct __sk_buff *skb)
 {
-	struct bpf_sock_tuple *tuple, ln = {0};
+	struct bpf_sock_tuple *tuple;
 	bool ipv4 = false;
 	bool tcp = false;
 	int tuple_len;
Signature · 1 line
2.32.0
#1 lore raw
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:

Hello:

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

Quoted 8 lines · On Tue, 29 Mar 2022 18:49:14 +0300 you wrote:

Was never used in bpf_sk_assign_test(), and was removed from handle_{tcp,udp} in commit 0b9ad56b1ea6
("selftests/bpf: Use SOCKMAP for server sockets in bpf_sk_assign test")

Fixes 0b9ad56b1ea6 ("selftests/bpf: Use SOCKMAP for server sockets in bpf_sk_assign test")

[...]

Here is the summary with links:
- [bpf] selftests/bpf: remove unused variable from bpf_sk_assign test

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

You are awesome, thank you!

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