All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 11/18] gcc-3.5: ne2k-pci.c
@ 2004-01-25 11:07 akpm
  2004-01-25 16:35 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2004-01-25 11:07 UTC (permalink / raw)
  To: davem; +Cc: netdev



drivers/net/ne2k-pci.c: In function `ne2k_pci_block_input':
drivers/net/ne2k-pci.c:539: error: invalid lvalue in increment
drivers/net/ne2k-pci.c: In function `ne2k_pci_block_output':
drivers/net/ne2k-pci.c:600: error: invalid lvalue in increment



---

 drivers/net/ne2k-pci.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff -puN drivers/net/ne2k-pci.c~gcc-35-ne2k-pci drivers/net/ne2k-pci.c
--- 25/drivers/net/ne2k-pci.c~gcc-35-ne2k-pci	2004-01-25 03:01:38.000000000 -0800
+++ 25-akpm/drivers/net/ne2k-pci.c	2004-01-25 03:01:38.000000000 -0800
@@ -532,8 +532,12 @@ static void ne2k_pci_block_input(struct 
 		insl(NE_BASE + NE_DATAPORT, buf, count>>2);
 		if (count & 3) {
 			buf += count & ~3;
-			if (count & 2)
-				*((u16*)buf)++ = le16_to_cpu(inw(NE_BASE + NE_DATAPORT));
+			if (count & 2) {
+				u16 *b = (u16 *)buf;
+
+				*b++ = le16_to_cpu(inw(NE_BASE + NE_DATAPORT));
+				buf = (char *)b;
+			}
 			if (count & 1)
 				*buf = inb(NE_BASE + NE_DATAPORT);
 		}
@@ -593,8 +597,12 @@ static void ne2k_pci_block_output(struct
 		outsl(NE_BASE + NE_DATAPORT, buf, count>>2);
 		if (count & 3) {
 			buf += count & ~3;
-			if (count & 2)
-				outw(cpu_to_le16(*((u16*)buf)++), NE_BASE + NE_DATAPORT);
+			if (count & 2) {
+				u16 *b = (u16 *)buf;
+
+				outw(cpu_to_le16(*b++), NE_BASE + NE_DATAPORT);
+				buf = (char *)b;
+			}
 		}
 	}
 

_

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

* Re: [patch 11/18] gcc-3.5: ne2k-pci.c
  2004-01-25 11:07 [patch 11/18] gcc-3.5: ne2k-pci.c akpm
@ 2004-01-25 16:35 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2004-01-25 16:35 UTC (permalink / raw)
  To: akpm; +Cc: davem, netdev

I'll pick this and the other drivers/net ones (except for tg3) up.

	Jeff

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

end of thread, other threads:[~2004-01-25 16:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-25 11:07 [patch 11/18] gcc-3.5: ne2k-pci.c akpm
2004-01-25 16:35 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.