Re: [PATCH] ip_vti: fix sparse warnings for VTI_ISVTI

2014-06-11 Thread David Miller
From: Dmitry Popov Date: Wed, 11 Jun 2014 15:09:14 +0400 > 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) >

Re: [PATCH] ip_vti: fix sparse warnings for VTI_ISVTI

2014-06-11 Thread Stephen Hemminger
On Wed, 11 Jun 2014 16:02:15 +0400 Dmitry Popov wrote: > On Wed, 11 Jun 2014 15:09:14 +0400 > Dmitry Popov wrote: > > > > > 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. > > > > If this patch

Re: [PATCH] ip_vti: fix sparse warnings for VTI_ISVTI

2014-06-11 Thread Dmitry Popov
On Wed, 11 Jun 2014 15:09:14 +0400 Dmitry Popov wrote: > > 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. > If this patch is okay I will submit it to iproute2 too. if_tunnel.h has to be synced. -- To

[PATCH] ip_vti: fix sparse warnings for VTI_ISVTI

2014-06-11 Thread Dmitry Popov
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]

[PATCH] ip_vti: fix sparse warnings for VTI_ISVTI

2014-06-11 Thread Dmitry Popov
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]

Re: [PATCH] ip_vti: fix sparse warnings for VTI_ISVTI

2014-06-11 Thread Dmitry Popov
On Wed, 11 Jun 2014 15:09:14 +0400 Dmitry Popov ixaph...@qrator.net wrote: 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. If this patch is okay I will submit it to iproute2 too. if_tunnel.h has to be

Re: [PATCH] ip_vti: fix sparse warnings for VTI_ISVTI

2014-06-11 Thread Stephen Hemminger
On Wed, 11 Jun 2014 16:02:15 +0400 Dmitry Popov ixaph...@qrator.net wrote: On Wed, 11 Jun 2014 15:09:14 +0400 Dmitry Popov ixaph...@qrator.net wrote: 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.

Re: [PATCH] ip_vti: fix sparse warnings for VTI_ISVTI

2014-06-11 Thread David Miller
From: Dmitry Popov ixaph...@qrator.net Date: Wed, 11 Jun 2014 15:09:14 +0400 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)