netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_reply
@ 2008-11-17  4:18 Harvey Harrison
  2008-11-17  7:04 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Harvey Harrison @ 2008-11-17  4:18 UTC (permalink / raw)
  To: David Miller; +Cc: linux-netdev, Al Viro, Karsten Keil

commit a144ea4b7a13087081ab5402fa9ad0bcfd249e67 [IPV4]: annotate struct in_ifaddr

Missed this extra byteswap as the isdn inlines hide the htonl inside put_u32
which causes an extra byteswap on little-endian arches.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
Dave, this is the minimal patch suitable to fix mainline without any net-next
material mixed in.  I'd suggest sending this one to Linus and then applying
my previous patch to net-next (if you need a resend, just ask)

Then whenever you do your net-next merge with Linus, the resolution should be trivial.

Harvey

 drivers/isdn/i4l/isdn_net.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index bb904a0..1bfc55d 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -1641,8 +1641,10 @@ isdn_net_ciscohdlck_slarp_send_reply(isdn_net_local *lp)
 	/* slarp reply, send own ip/netmask; if values are nonsense remote
 	 * should think we are unable to provide it with an address via SLARP */
 	p += put_u32(p, CISCO_SLARP_REPLY);
-	p += put_u32(p, addr);	// address
-	p += put_u32(p, mask);	// netmask
+	*(__be32 *)p = addr;	// address
+	p += 4;
+	*(__be32 *)p = mask;	// netmask
+	p += 4;
 	p += put_u16(p, 0);	// unused
 
 	isdn_net_write_super(lp, skb);
-- 
1.6.0.4.994.g16bd3e




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

* Re: [PATCH] isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_reply
  2008-11-17  4:18 [PATCH] isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_reply Harvey Harrison
@ 2008-11-17  7:04 ` David Miller
  2008-11-17  7:15   ` Harvey Harrison
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2008-11-17  7:04 UTC (permalink / raw)
  To: harvey.harrison; +Cc: netdev, viro, kkeil

From: Harvey Harrison <harvey.harrison@gmail.com>
Date: Sun, 16 Nov 2008 20:18:36 -0800

> commit a144ea4b7a13087081ab5402fa9ad0bcfd249e67 [IPV4]: annotate struct in_ifaddr
> 
> Missed this extra byteswap as the isdn inlines hide the htonl inside put_u32
> which causes an extra byteswap on little-endian arches.
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>

Applied, thanks.

> Dave, this is the minimal patch suitable to fix mainline without any net-next
> material mixed in.  I'd suggest sending this one to Linus and then applying
> my previous patch to net-next (if you need a resend, just ask)
> 
> Then whenever you do your net-next merge with Linus, the resolution should be trivial.

Please resend when I do my merges after Linus takes the change, I'll announce this
on netdev as I always do.

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

* Re: [PATCH] isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_reply
  2008-11-17  7:04 ` David Miller
@ 2008-11-17  7:15   ` Harvey Harrison
  0 siblings, 0 replies; 3+ messages in thread
From: Harvey Harrison @ 2008-11-17  7:15 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, viro, kkeil

On Sun, 2008-11-16 at 23:04 -0800, David Miller wrote:
> From: Harvey Harrison <harvey.harrison@gmail.com>
> Date: Sun, 16 Nov 2008 20:18:36 -0800
> 
> > commit a144ea4b7a13087081ab5402fa9ad0bcfd249e67 [IPV4]: annotate struct in_ifaddr
> > 
> > Missed this extra byteswap as the isdn inlines hide the htonl inside put_u32
> > which causes an extra byteswap on little-endian arches.
> > 
> > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> 
> Applied, thanks.
> 
> > Dave, this is the minimal patch suitable to fix mainline without any net-next
> > material mixed in.  I'd suggest sending this one to Linus and then applying
> > my previous patch to net-next (if you need a resend, just ask)
> > 
> > Then whenever you do your net-next merge with Linus, the resolution should be trivial.
> 
> Please resend when I do my merges after Linus takes the change, I'll announce this
> on netdev as I always do.

OK, will do.

Harvey


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

end of thread, other threads:[~2008-11-17  7:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17  4:18 [PATCH] isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_reply Harvey Harrison
2008-11-17  7:04 ` David Miller
2008-11-17  7:15   ` Harvey Harrison

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).