]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: fix sparse warning in sk_dst_set()
authorEric Dumazet <edumazet@google.com>
Wed, 2 Jul 2014 09:39:38 +0000 (02:39 -0700)
committerJiri Slaby <jslaby@suse.cz>
Thu, 9 Apr 2015 12:13:51 +0000 (14:13 +0200)
commit1f2251ec984761b34036316a43a5eb2dc6e9df90
treed46859e106c34dab6a684e7afcbfbefd12929d48
parent12ea1092de881c1634d0ddc1e6004b1ae848895b
net: fix sparse warning in sk_dst_set()

commit 5925a0555bdaf0b396a84318cbc21ba085f6c0d3 upstream.

sk_dst_cache has __rcu annotation, so we need a cast to avoid
following sparse error :

include/net/sock.h:1774:19: warning: incorrect type in initializer (different address spaces)
include/net/sock.h:1774:19:    expected struct dst_entry [noderef] <asn:4>*__ret
include/net/sock.h:1774:19:    got struct dst_entry *dst

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 7f502361531e ("ipv4: irq safe sk_dst_[re]set() and ipv4_sk_update_pmtu() fix")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
include/net/sock.h