Re: [PATCH]: Third (final?) release of Sun Neptune driver

David Miller
2007-10-05T21:20:02Z

From: Ingo Oeser <netdev@axxeo.de>
Date: Fri, 5 Oct 2007 18:46:19 +0200

> David Miller schrieb:
> > +#define nr64(reg) readq(np->regs + (reg))
> > +#define nw64(reg, val) writeq((val), np->regs + (reg))
> > +
> > +#define nr64_mac(reg) readq(np->mac_regs + (reg))
> > +#define nw64_mac(reg, val) writeq((val), np->mac_regs + (reg))
> > +
> > +#define nr64_ipp(reg) readq(np->regs + np->ipp_off + (reg))
> > +#define nw64_ipp(reg, val) writeq((val), np->regs + np->ipp_off + (reg))
> > +
> > +#define nr64_pcs(reg) readq(np->regs + np->pcs_off + (reg))
> > +#define nw64_pcs(reg, val) writeq((val), np->regs + np->pcs_off + (reg))
> > +
> > +#define nr64_xpcs(reg) readq(np->regs + np->xpcs_off + (reg))
> > +#define nw64_xpcs(reg, val) writeq((val), np->regs + np->xpcs_off + (reg))
>
> Can these be static inline and get the "struct niu *np" passed?

Absolutely not, this was discussed to death in the first review. This
is a common sequence which is used in several driver, which saves a
lot of typing and carpel-tunnel syndrome.