netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 1/2] net: fix a sparse warning
@ 2014-10-06 20:22 Andy Zhou
  2014-10-06 20:22 ` [net-next 2/2] openvswitch: " Andy Zhou
  2014-10-07  4:11 ` [net-next 1/2] net: " David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Zhou @ 2014-10-06 20:22 UTC (permalink / raw)
  To: davem; +Cc: netdev, Andy Zhou

Fix a sparse warning introduced by Commit
0b5e8b8eeae40bae6ad7c7e91c97c3c0d0e57882 (net: Add Geneve tunneling
protocol driver) caught by kbuild test robot:

  # apt-get install sparse
  #   git checkout 0b5e8b8eeae40bae6ad7c7e91c97c3c0d0e57882
  #     make ARCH=x86_64 allmodconfig
  #       make C=1 CF=-D__CHECK_ENDIAN__
  #
  #
  #       sparse warnings: (new ones prefixed by >>)
  #
  #       >> net/ipv4/geneve.c:230:42: sparse: incorrect type in assignment (different base types)
  #          net/ipv4/geneve.c:230:42:    expected restricted __be32 [addressable] [assigned] [usertype] s_addr
  #             net/ipv4/geneve.c:230:42:    got unsigned long [unsigned] <noident>
  #

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
---
 net/ipv4/geneve.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
index f008c55..065cd94 100644
--- a/net/ipv4/geneve.c
+++ b/net/ipv4/geneve.c
@@ -227,7 +227,7 @@ static struct socket *geneve_create_sock(struct net *net, bool ipv6,
 		udp_conf.family = AF_INET6;
 	} else {
 		udp_conf.family = AF_INET;
-		udp_conf.local_ip.s_addr = INADDR_ANY;
+		udp_conf.local_ip.s_addr = htonl(INADDR_ANY);
 	}
 
 	udp_conf.local_udp_port = port;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-07  4:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-06 20:22 [net-next 1/2] net: fix a sparse warning Andy Zhou
2014-10-06 20:22 ` [net-next 2/2] openvswitch: " Andy Zhou
2014-10-07  4:11   ` David Miller
2014-10-07  4:11 ` [net-next 1/2] net: " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).