Re: Warning Fix drivers/net/wireless in Kernel 2.6.9
From: David Gibson
Date: Wed Nov 10 2004 - 19:02:50 EST
On Wed, Nov 10, 2004 at 12:51:43PM -0800, Bryan Batten wrote:
> The patch removes the "makes pointer from integer without a cast"
> warnings in orinoco code by casting the appropriate parameter to
> readw, writew as (void *) in the header file hermes.h.
>
> The underlying problem is that readw/writes boil down to low level
> calls that take a pointer, while inw/outw boil down (eventually) to
> low level calls that take an int. So the choice was to either cast
> inw, outw parameters as (int)'s, or cast readw, writew parameters as
> (void *). I chose the latter.
>
> I suspect the truly "best" fix would be to change the underlying
> inx/outx definitions to accept a pointer, so's to be consistent
> with the definitions of readx/writex, but that would probably break
> other stuff.
That's what the new ioread*() and iowrite*() functions are for. Al
Viro has already made a fix to use these, and it is in the netdev bk
tree.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist. NOT _the_ _other_ _way_
| _around_!
http://www.ozlabs.org/people/dgibson
-
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/