Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h

From: Jan Dittmer <[email-masked]>
Date: Mon, 11 Oct 2004 13:54:44 +0200

Cal Peake wrote:
> Hi,
> 
> This patch fixes several dozen warnings spit out when compiling the hermes 
> wireless driver.
> 
> In file included from drivers/net/wireless/orinoco.c:448:
> drivers/net/wireless/hermes.h: In function `hermes_present':
> drivers/net/wireless/hermes.h:398: warning: passing arg 1 of `readw' makes pointer from integer without a cast
> drivers/net/wireless/hermes.h: In function `hermes_set_irqmask':
> drivers/net/wireless/hermes.h:404: warning: passing arg 2 of `writew' makes pointer from integer without a cast
> ...

>  	inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \
> -	readw((hw)->iobase + ( (off) << (hw)->reg_spacing )))
> +	readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing )))
>  #define hermes_write_reg(hw, off, val) do { \

Isn't the correct fix to declare iobase as (void __iomem *) ?

Thanks,

Jank