[PATCH][2.4.28-pre3] matrox framebuffer driver gcc-3.4 fix

From: Mikael Pettersson
Date: Sun Sep 12 2004 - 15:11:32 EST


This patch fixes gcc-3.4 cast-as-lvalue warnings in the 2.4.28-pre3
kernel's matrox framebuffer driver. The changes are backports from
the 2.6 kernel. The warnings don't appear for x86, but they do appear
for ppc32.

/Mikael

--- linux-2.4.28-pre3/drivers/video/matrox/matroxfb_base.h.~1~ 2003-08-25 20:07:46.000000000 +0200
+++ linux-2.4.28-pre3/drivers/video/matrox/matroxfb_base.h 2004-09-12 21:32:52.000000000 +0200
@@ -253,21 +253,21 @@
#ifdef MEMCPYTOIO_WORKS
memcpy_toio(va.vaddr + offs, src, len);
#elif defined(MEMCPYTOIO_WRITEL)
-#define srcd ((const u_int32_t*)src)
if (offs & 3) {
while (len >= 4) {
- mga_writel(va, offs, get_unaligned(srcd++));
+ mga_writel(va, offs, get_unaligned((u32 *)src));
offs += 4;
len -= 4;
+ src += 4;
}
} else {
while (len >= 4) {
- mga_writel(va, offs, *srcd++);
+ mga_writel(va, offs, *(u32 *)src);
offs += 4;
len -= 4;
+ src += 4;
}
}
-#undef srcd
if (len) {
u_int32_t tmp;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/