From: Eric Dumazet Date: Thu, 18 Aug 2016 17:19:34 +0000 (-0700) Subject: net: ipv4: fix sparse error in fib_good_nh() X-Git-Tag: MMI-PSA29.97-13-9~6950^2~59 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d985d15151c0e9d3add8050da77d8f507f6cc7f5;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git net: ipv4: fix sparse error in fib_good_nh() 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: a6db4494d218c ("net: ipv4: Consider failed nexthops in multipath routes") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 539fa264e67d..8066ccc48a17 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -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;