On Tue, 22 Jan 2008 15:11:37 +0300
Anton Salnikov <[EMAIL PROTECTED]> wrote:
> > > +static inline u32 ioread(u32 reg)
> > > +{
> > > + return ioread32(base + reg);
> > > +}
> > > +
> > > +static inline void iowrite(u32 val, u32 reg)
> > > +{
> > > + iowrite32(val, base + reg);
> > > +}
> >
> > Why not just use ioread32/iowrite32 directly ?
>
> Because this increases readability and does not affect functionality at all
There I would disagree. It means that if you ever have a system with two
of these controllers in future it will break as base is a static for the
entire driver.
Easy enough to fix with a simple
static inline u32 hwif_ioread32(hwif, u32 reg) { ...
hwif->dma_base ...}
version ?
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html