netdev
[Top] [All Lists]

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

To: Jan Dittmer <j.dittmer@xxxxxxxxxxx>
Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h
From: David Gibson <hermes@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Oct 2004 22:32:17 +1000
Cc: Cal Peake <cp@xxxxxxxxxxxxxxxxxxx>, Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, NetDev Mailing List <netdev@xxxxxxxxxxx>, proski@xxxxxxx
In-reply-to: <416A7CB3.9000003@xxxxxxxxxxx>
Mail-followup-to: David Gibson <hermes@xxxxxxxxxxxxxxxxxxxxx>, Jan Dittmer <j.dittmer@xxxxxxxxxxx>, Cal Peake <cp@xxxxxxxxxxxxxxxxxxx>, Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, NetDev Mailing List <netdev@xxxxxxxxxxx>, proski@xxxxxxx
References: <Pine.LNX.4.61.0410110702590.7899@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <416A7484.1030703@xxxxxxxxxxx> <Pine.LNX.4.61.0410110819370.8480@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <416A7CB3.9000003@xxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
On Mon, Oct 11, 2004 at 02:29:39PM +0200, Jan Dittmer wrote:
> Cal Peake wrote:
> >On Mon, 11 Oct 2004, Jan Dittmer wrote:
> >
> >
> >>Cal Peake wrote:
> >>
> >>
> >>>   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 *) ?
> >
> >
> >iobase is an unsigned long, declaring it as a void pointer is prolly not 
> >what we want to do here. The typecast seems proper. A lot of other drivers 
> >do this as well thus it must be proper ;-)
> 
> Why is iobase a unsigned long in the first place? Isn't this broken for 
> 64bit archs?

Um, no.

-- 
David Gibson                    | For every complex problem there is a
david AT gibson.dropbear.id.au  | solution which is simple, neat and
                                | wrong.
http://www.ozlabs.org/people/dgibson

<Prev in Thread] Current Thread [Next in Thread>