Re: [PATCH][2.6.9-rc2] Specialix RIO driver gcc-3.4 fixes

From: Denis Vlasenko
Date: Sat Sep 18 2004 - 08:30:29 EST


On Saturday 18 September 2004 15:42, Mikael Pettersson wrote:
> This patch fixes gcc-3.4 cast-as-lvalue warnings in the 2.6.9-rc2
> kernel's Specialix RIO driver. This is a forward port of the fix
> I made for the 2.4 kernel.
>
> /Mikael
>
> --- linux-2.6.9-rc2/drivers/char/rio/rio_linux.c.~1~ 2004-03-11 14:01:27.000000000 +0100
> +++ linux-2.6.9-rc2/drivers/char/rio/rio_linux.c 2004-09-18 14:27:33.000000000 +0200
> @@ -1139,7 +1139,7 @@
> if (((1 << hp->Ivec) & rio_irqmask) == 0)
> hp->Ivec = 0;
> hp->CardP = (struct DpRam *)
> - hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
> + (hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN));

I think it's best to untangle assignments, it's easier to read this way:

hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
hp->CardP = (struct DpRam *) hp->Caddr;
--
vda

-
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/