Skip to contentSkip to conversation

vti: fix sparse bit endian warnings

PATCH In review Stephen Hemminger 2 participants 2 messages Oct 11, 2012 – Oct 12, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vti: fix sparse bit endian warnings

Use be32_to_cpu instead of htonl to keep sparse happy.

net/ipv4/ip_vti.c +2 -2
@@ -374,7 +374,7 @@ static netdev_tx_t vti_tunnel_xmit(struc
 
 	memset(&fl4, 0, sizeof(fl4));
 	flowi4_init_output(&fl4, tunnel->parms.link,
-			   htonl(tunnel->parms.i_key), RT_TOS(tos),
+			   be32_to_cpu(tunnel->parms.i_key), RT_TOS(tos),
 			   RT_SCOPE_UNIVERSE,
 			   IPPROTO_IPIP, 0,
 			   dst, tiph->saddr, 0, 0);
@@ -441,7 +441,7 @@ static int vti_tunnel_bind_dev(struct ne
 		struct flowi4 fl4;
 		memset(&fl4, 0, sizeof(fl4));
 		flowi4_init_output(&fl4, tunnel->parms.link,
-				   htonl(tunnel->parms.i_key),
+				   be32_to_cpu(tunnel->parms.i_key),
 				   RT_TOS(iph->tos), RT_SCOPE_UNIVERSE,
 				   IPPROTO_IPIP, 0,
 				   iph->daddr, iph->saddr, 0, 0);