netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: akpm@osdl.org
To: davem@redhat.com
Cc: netdev@oss.sgi.com
Subject: [patch 11/18] gcc-3.5: ne2k-pci.c
Date: Sun, 25 Jan 2004 03:07:46 -0800	[thread overview]
Message-ID: <200401251107.i0PB7ko25097@mail.osdl.org> (raw)



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;
+			}
 		}
 	}
 

_

             reply	other threads:[~2004-01-25 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-25 11:07 akpm [this message]
2004-01-25 16:35 ` [patch 11/18] gcc-3.5: ne2k-pci.c Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401251107.i0PB7ko25097@mail.osdl.org \
    --to=akpm@osdl.org \
    --cc=davem@redhat.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).