Skip to contentSkip to conversation

Fix compilation errors in maps/dc21285.c

PATCH In review Martin Michlmayr 2 participants 3 messages Jan 10, 2006 – Feb 4, 2006 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix compilation errors in maps/dc21285.c

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

---

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

The patch is against 2.6.15

mtd/maps/dc21285.c renamed from mtd/maps/dc21285.c~ +6 -3
@@ -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--;
 }
Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#1 lore raw
Quoted 1 line · Martin Michlmayr

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

This is in Linus' git tree now.

Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#2 lore raw
Quoted 5 lines · Martin Michlmayr
Quoted 1 line · Martin Michlmayr

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

This is in Linus' git tree now.

Thanks Martin!

Jörn

Signature · 4 lines
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