Commit 843a8851 authored by Breno Leitao's avatar Breno Leitao Committed by David S. Miller

net: blackhole_dev: fix build warning for ethh set but not used

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: 509e56b3 ("blackhole_dev: add a selftest")
Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3b39ea2
...@@ -29,7 +29,6 @@ static int __init test_blackholedev_init(void) ...@@ -29,7 +29,6 @@ static int __init test_blackholedev_init(void)
{ {
struct ipv6hdr *ip6h; struct ipv6hdr *ip6h;
struct sk_buff *skb; struct sk_buff *skb;
struct ethhdr *ethh;
struct udphdr *uh; struct udphdr *uh;
int data_len; int data_len;
int ret; int ret;
...@@ -61,7 +60,7 @@ static int __init test_blackholedev_init(void) ...@@ -61,7 +60,7 @@ static int __init test_blackholedev_init(void)
ip6h->saddr = in6addr_loopback; ip6h->saddr = in6addr_loopback;
ip6h->daddr = in6addr_loopback; ip6h->daddr = in6addr_loopback;
/* Ether */ /* Ether */
ethh = (struct ethhdr *)skb_push(skb, sizeof(struct ethhdr)); skb_push(skb, sizeof(struct ethhdr));
skb_set_mac_header(skb, 0); skb_set_mac_header(skb, 0);
skb->protocol = htons(ETH_P_IPV6); skb->protocol = htons(ETH_P_IPV6);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment