public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] Fix compilation errors in maps/dc21285.c
@ 2006-01-10 21:20 Martin Michlmayr
  2006-02-04  0:51 ` Martin Michlmayr
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Michlmayr @ 2006-01-10 21:20 UTC (permalink / raw)
  To: linux-mtd; +Cc: Nicolas Pitre

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/

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

* Re: [PATCH] Fix compilation errors in maps/dc21285.c
  2006-01-10 21:20 [PATCH] Fix compilation errors in maps/dc21285.c Martin Michlmayr
@ 2006-02-04  0:51 ` Martin Michlmayr
  2006-02-04  7:44   ` Jörn Engel
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Michlmayr @ 2006-02-04  0:51 UTC (permalink / raw)
  To: linux-mtd; +Cc: Nicolas Pitre

* Martin Michlmayr <tbm@cyrius.com> [2006-01-10 21:20]:
> This patch fixes the following compilation errors in maps/dc21285.c.

This is in Linus' git tree now.
-- 
Martin Michlmayr
http://www.cyrius.com/

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

* Re: [PATCH] Fix compilation errors in maps/dc21285.c
  2006-02-04  0:51 ` Martin Michlmayr
@ 2006-02-04  7:44   ` Jörn Engel
  0 siblings, 0 replies; 3+ messages in thread
From: Jörn Engel @ 2006-02-04  7:44 UTC (permalink / raw)
  To: Martin Michlmayr; +Cc: Nicolas Pitre, linux-mtd

On Sat, 4 February 2006 00:51:11 +0000, Martin Michlmayr wrote:
> 
> * Martin Michlmayr <tbm@cyrius.com> [2006-01-10 21:20]:
> > This patch fixes the following compilation errors in maps/dc21285.c.
> 
> This is in Linus' git tree now.

Thanks Martin!

Jörn

-- 
Fancy algorithms are slow when n is small, and n is usually small.
Fancy algorithms have big constants. Until you know that n is
frequently going to be big, don't get fancy.
-- Rob Pike

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

end of thread, other threads:[~2006-02-04  7:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-10 21:20 [PATCH] Fix compilation errors in maps/dc21285.c Martin Michlmayr
2006-02-04  0:51 ` Martin Michlmayr
2006-02-04  7:44   ` Jörn Engel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox