diff options
author | Dmitry Popov <ixaphire@qrator.net> | 2014-06-11 07:09:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-11 18:39:19 -0400 |
commit | efd0f11d85e16d375dddeb77e8e78f43c67c5b13 (patch) | |
tree | ef57d6b920ceaff4b991aaebfa75ca21d78d1587 | |
parent | 2f87208efb5d06003d8f49af06e4501e768c8627 (diff) |
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>
-rw-r--r-- | include/uapi/linux/if_tunnel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h index aee73d0611fb..3bce9e9d9f7c 100644 --- a/include/uapi/linux/if_tunnel.h +++ b/include/uapi/linux/if_tunnel.h | |||
@@ -100,7 +100,7 @@ enum { | |||
100 | #define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1) | 100 | #define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1) |
101 | 101 | ||
102 | /* VTI-mode i_flags */ | 102 | /* VTI-mode i_flags */ |
103 | #define VTI_ISVTI 0x0001 | 103 | #define VTI_ISVTI ((__force __be16)0x0001) |
104 | 104 | ||
105 | enum { | 105 | enum { |
106 | IFLA_VTI_UNSPEC, | 106 | IFLA_VTI_UNSPEC, |