| To: | Cal Peake <cp@xxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h |
| From: | viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| Date: | Mon, 11 Oct 2004 14:16:03 +0100 |
| Cc: | Jan Dittmer <j.dittmer@xxxxxxxxxxx>, Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, NetDev Mailing List <netdev@xxxxxxxxxxx>, proski@xxxxxxx, hermes@xxxxxxxxxxxxxxxxxxxxx |
| In-reply-to: | <Pine.LNX.4.61.0410110819370.8480@xxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| References: | <Pine.LNX.4.61.0410110702590.7899@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <416A7484.1030703@xxxxxxxxxxx> <Pine.LNX.4.61.0410110819370.8480@xxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.1i |
On Mon, Oct 11, 2004 at 08:23:35AM -0400, 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 ;-)
Typecast is not a proper solution here. Folks, there are cleanups underway
for all that mess, but it's not _that_ simple.
And adding casts to shut the warnings up is wrong in 99% of cases.
|
| Previous by Date: | Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h, Ben Dooks |
|---|---|
| Next by Date: | Re: via-velocity heads up (was (Re: Linux 2.6.9-rc4 - pls test (and no more patches)), Daniel Andersen |
| Previous by Thread: | Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h, Ben Dooks |
| Next by Thread: | Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h, Cal Peake |
| Indexes: | [Date] [Thread] [Top] [All Lists] |