Skip to contentSkip to conversation

gcc-3.5: ne2k-pci.c

PATCH In review [email protected] 2 participants 2 messages Jan 25, 2004

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

PATCH 11/18 gcc-3.5: ne2k-pci.c

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(-)
drivers/net/ne2k-pci.c renamed from drivers/net/ne2k-pci.c~gcc-35-ne2k-pci +12 -4
diff -puN drivers/net/ne2k-pci.c~gcc-35-ne2k-pci drivers/net/ne2k-pci.c
@@ -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;
+			}
 		}
 	}
 

_

#1 lore raw

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

Jeff