Skip to content

Commit

Permalink
net: ipv4: fix sparse error in fib_good_nh()
Browse files Browse the repository at this point in the history
Fixes following sparse errors :

net/ipv4/fib_semantics.c:1579:61: warning: incorrect type in argument 2
(different base types)
net/ipv4/fib_semantics.c:1579:61:    expected unsigned int [unsigned]
[usertype] key
net/ipv4/fib_semantics.c:1579:61:    got restricted __be32 const
[usertype] nh_gw

Fixes: a6db449 ("net: ipv4: Consider failed nexthops in multipath routes")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Aug 20, 2016
1 parent 217375a commit d985d15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/fib_semantics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,8 @@ static bool fib_good_nh(const struct fib_nh *nh)

rcu_read_lock_bh();

n = __ipv4_neigh_lookup_noref(nh->nh_dev, nh->nh_gw);
n = __ipv4_neigh_lookup_noref(nh->nh_dev,
(__force u32)nh->nh_gw);
if (n)
state = n->nud_state;

Expand Down

0 comments on commit d985d15

Please sign in to comment.