public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Martin Michlmayr <tbm@cyrius.com>
To: linux-mtd@lists.infradead.org
Cc: Nicolas Pitre <nico@cam.org>
Subject: [PATCH] Fix compilation errors in maps/dc21285.c
Date: Tue, 10 Jan 2006 21:20:54 +0000	[thread overview]
Message-ID: <20060110212054.GA12650@deprecation.cyrius.com> (raw)

This patch fixes the following compilation errors in maps/dc21285.c.

  CC      drivers/mtd/maps/dc21285.o
drivers/mtd/maps/dc21285.c: In function ‘dc21285_copy_to_32’:
drivers/mtd/maps/dc21285.c:113: error: invalid lvalue in increment
drivers/mtd/maps/dc21285.c: In function ‘dc21285_copy_to_16’:
drivers/mtd/maps/dc21285.c:124: error: invalid lvalue in increment
drivers/mtd/maps/dc21285.c: In function ‘dc21285_copy_to_8’:
drivers/mtd/maps/dc21285.c:134: error: invalid lvalue in increment
make[3]: *** [drivers/mtd/maps/dc21285.o] Error 1

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>

---

 dc21285.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

The patch is against 2.6.15

--- drivers/mtd/maps/dc21285.c~	2006-01-10 19:40:53.000000000 +0000
+++ drivers/mtd/maps/dc21285.c	2006-01-10 19:52:14.000000000 +0000
@@ -110,8 +110,9 @@
 {
 	while (len > 0) {
 		map_word d;
-		d.x[0] = *((uint32_t*)from)++;
+		d.x[0] = *((uint32_t*)from);
 		dc21285_write32(map, d, to);
+		from += 4;
 		to += 4;
 		len -= 4;
 	}
@@ -121,8 +122,9 @@
 {
 	while (len > 0) {
 		map_word d;
-		d.x[0] = *((uint16_t*)from)++;
+		d.x[0] = *((uint16_t*)from);
 		dc21285_write16(map, d, to);
+		from += 2;
 		to += 2;
 		len -= 2;
 	}
@@ -131,8 +133,9 @@
 static void dc21285_copy_to_8(struct map_info *map, unsigned long to, const void *from, ssize_t len)
 {
 	map_word d;
-	d.x[0] = *((uint8_t*)from)++;
+	d.x[0] = *((uint8_t*)from);
 	dc21285_write8(map, d, to);
+	from++;
 	to++;
 	len--;
 }

-- 
Martin Michlmayr
http://www.cyrius.com/

             reply	other threads:[~2006-01-10 21:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-10 21:20 Martin Michlmayr [this message]
2006-02-04  0:51 ` [PATCH] Fix compilation errors in maps/dc21285.c Martin Michlmayr
2006-02-04  7:44   ` Jörn Engel

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=20060110212054.GA12650@deprecation.cyrius.com \
    --to=tbm@cyrius.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nico@cam.org \
    /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