Skip to contentSkip to conversation

selftests/bpf: remove unused variable in tc_tunnel prog

PATCH Applied Tobias Klauser 4 participants 4 messages Jul 13, 2021 – Jul 15, 2021

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

PATCH 1/1 selftests/bpf: remove unused variable in tc_tunnel prog

The variable buf is unused since commit 005edd16562b ("selftests/bpf:
convert bpf tunnel test to BPF_ADJ_ROOM_MAC"). Remove it to fix the following warning:

test_tc_tunnel.c:531:7: warning: unused variable 'buf' [-Wunused-variable]

Fixes 005edd16562b ("selftests/bpf: convert bpf tunnel test to BPF_ADJ_ROOM_MAC")
---
 tools/testing/selftests/bpf/progs/test_tc_tunnel.c | 1 -
 1 file changed, 1 deletion(-)
tools/testing/selftests/bpf/progs/test_tc_tunnel.c +0 -1
index 84cd63259554..a0e7762b1e5a 100644
@@ -528,7 +528,6 @@ int __encap_ip6vxlan_eth(struct __sk_buff *skb)
 
 static int decap_internal(struct __sk_buff *skb, int off, int len, char proto)
 {
-	char buf[sizeof(struct v6hdr)];
 	struct gre_hdr greh;
 	struct udphdr udph;
 	int olen = len;
Signature · 1 line
2.31.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Tobias Klauser

The variable buf is unused since commit 005edd16562b ("selftests/bpf:
convert bpf tunnel test to BPF_ADJ_ROOM_MAC"). Remove it to fix the following warning:

test_tc_tunnel.c:531:7: warning: unused variable 'buf' [-Wunused-variable]

Fixes 005edd16562b ("selftests/bpf: convert bpf tunnel test to BPF_ADJ_ROOM_MAC")

Thanks for the fix, Tobias.

#2 lore raw
Quoted 6 lines · Willem de Bruijn
Quoted 5 lines · Tobias Klauser

The variable buf is unused since commit 005edd16562b ("selftests/bpf:
convert bpf tunnel test to BPF_ADJ_ROOM_MAC"). Remove it to fix the following warning:

Quoted 8 lines
Quoted 4 lines

test_tc_tunnel.c:531:7: warning: unused variable 'buf' [-Wunused-variable]

Fixes 005edd16562b ("selftests/bpf: convert bpf tunnel test to BPF_ADJ_ROOM_MAC")

Thanks for the fix, Tobias.

#3 lore raw
In reply to Tobias Klauser
This patch was applied to bpf/bpf-next.git (refs/heads/master):

Hello:

This patch was applied to bpf/bpf-next.git (refs/heads/master):

Quoted 10 lines · On Tue, 13 Jul 2021 12:27:19 +0200 you wrote:

The variable buf is unused since commit 005edd16562b ("selftests/bpf:
convert bpf tunnel test to BPF_ADJ_ROOM_MAC"). Remove it to fix the following warning:

test_tc_tunnel.c:531:7: warning: unused variable 'buf' [-Wunused-variable]

Fixes 005edd16562b ("selftests/bpf: convert bpf tunnel test to BPF_ADJ_ROOM_MAC")

[...]

Here is the summary with links:
- [bpf-next] selftests/bpf: remove unused variable in tc_tunnel prog

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

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html