]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ip_vti: fix sparse warnings for VTI_ISVTI
authorDmitry Popov <ixaphire@qrator.net>
Wed, 11 Jun 2014 11:09:14 +0000 (15:09 +0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jun 2014 22:39:19 +0000 (15:39 -0700)
commitefd0f11d85e16d375dddeb77e8e78f43c67c5b13
treeef57d6b920ceaff4b991aaebfa75ca21d78d1587
parent2f87208efb5d06003d8f49af06e4501e768c8627
ip_vti: fix sparse warnings for VTI_ISVTI

This patch fixes the following sparse warnings:

net/ipv4/ip_tunnel.c:245:53: warning: restricted __be16 degrades to integer
net/ipv4/ip_vti.c:321:19: warning: incorrect type in assignment (different base types)
net/ipv4/ip_vti.c:321:19:    expected restricted __be16 [addressable] [assigned] [usertype] i_flags
net/ipv4/ip_vti.c:321:19:    got int
net/ipv4/ip_vti.c:447:24: warning: incorrect type in assignment (different base types)
net/ipv4/ip_vti.c:447:24:    expected restricted __be16 [usertype] i_flags
net/ipv4/ip_vti.c:447:24:    got int

Since VTI_ISVTI is always used with ip_tunnel_parm->i_flags (which is __be16),
we can __force cast VTI_ISVTI to __be16 in header file.

Signed-off-by: Dmitry Popov <ixaphire@qrator.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_tunnel.h