Skip to content

Commit

Permalink
net: fix a sparse warning
Browse files Browse the repository at this point in the history
Fix a sparse warning introduced by Commit
0b5e8b8 (net: Add Geneve tunneling
protocol driver) caught by kbuild test robot:

  # apt-get install sparse
  #   git checkout 0b5e8b8
  #     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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andy Zhou authored and David S. Miller committed Oct 7, 2014
1 parent 6093f75 commit 42350dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/geneve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 42350dc

Please sign in to comment.