netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vti: fix sparse bit endian warnings
@ 2012-10-11 22:51 Stephen Hemminger
  2012-10-12 17:57 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2012-10-11 22:51 UTC (permalink / raw)
  To: David Miller, Saurabh Mohan; +Cc: netdev

Use be32_to_cpu instead of htonl to keep sparse happy.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.org>

--- a/net/ipv4/ip_vti.c	2012-10-10 11:54:57.165566432 -0700
+++ b/net/ipv4/ip_vti.c	2012-10-11 11:06:35.696333265 -0700
@@ -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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] vti: fix sparse bit endian warnings
  2012-10-11 22:51 [PATCH] vti: fix sparse bit endian warnings Stephen Hemminger
@ 2012-10-12 17:57 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-10-12 17:57 UTC (permalink / raw)
  To: shemminger; +Cc: saurabh.mohan, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Thu, 11 Oct 2012 15:51:28 -0700

> Use be32_to_cpu instead of htonl to keep sparse happy.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.org>

Using ntohl() would have been just as appropriate a fix, but
whatever, applied.  Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-12 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-11 22:51 [PATCH] vti: fix sparse bit endian warnings Stephen Hemminger
2012-10-12 17:57 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).