diff options
| author | Breno Leitao <leitao@debian.org> | 2024-02-02 07:13:29 -0800 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2024-03-26 18:21:50 -0400 |
| commit | 7d4b47f20f7e83af00d25d9fe96d34b8732eaf58 (patch) | |
| tree | 65a6916c27d3af0f238faf4f91f6667b54d34b12 /lib | |
| parent | 918d7f0d3ee9eba0b1ced76f199012ef504faa69 (diff) | |
| download | linux-7d4b47f20f7e83af00d25d9fe96d34b8732eaf58.tar.gz linux-7d4b47f20f7e83af00d25d9fe96d34b8732eaf58.tar.bz2 linux-7d4b47f20f7e83af00d25d9fe96d34b8732eaf58.zip | |
net: blackhole_dev: fix build warning for ethh set but not used
[ Upstream commit 843a8851e89e2e85db04caaf88d8554818319047 ]
lib/test_blackhole_dev.c sets a variable that is never read, causing
this following building warning:
lib/test_blackhole_dev.c:32:17: warning: variable 'ethh' set but not used [-Wunused-but-set-variable]
Remove the variable struct ethhdr *ethh, which is unused.
Fixes: 509e56b37cc3 ("blackhole_dev: add a selftest")
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/test_blackhole_dev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/test_blackhole_dev.c b/lib/test_blackhole_dev.c index 4c40580a99a3..f247089d63c0 100644 --- a/lib/test_blackhole_dev.c +++ b/lib/test_blackhole_dev.c @@ -29,7 +29,6 @@ static int __init test_blackholedev_init(void) { struct ipv6hdr *ip6h; struct sk_buff *skb; - struct ethhdr *ethh; struct udphdr *uh; int data_len; int ret; @@ -61,7 +60,7 @@ static int __init test_blackholedev_init(void) ip6h->saddr = in6addr_loopback; ip6h->daddr = in6addr_loopback; /* Ether */ - ethh = (struct ethhdr *)skb_push(skb, sizeof(struct ethhdr)); + skb_push(skb, sizeof(struct ethhdr)); skb_set_mac_header(skb, 0); skb->protocol = htons(ETH_P_IPV6); |
