Please remember that checkpatch is a stupid little scripted toolUnderstood.
and the actual goal is to have readable code.
That is the reason why I put them all together in one static function:
Look a bit beyond the code and see if and how you could make the
code better.
All of these macros have the same form and logic.
Perhaps it'd be better to use another indirect macro and define
all of these with that new macro.
Something like:
#define mac_v(iobase, reg) \
do { \
void __iomem *addr = (iobase) + (reg); \
iowrite32(ioread32(addr) & DMACTL_RUN ? DMACTL_WAKE : DMACTL_RUN,\
addr); \
} while (0)
#define MACvReceive0(iobase) mac_v(iobase, MAC_REG_RXDMACTL0)
#define MACvReceive1(iobase) mac_v(iobase, MAC_REG_RXDMACTL1)
#define MACvTransmit0(iobase) mac_v(iobase, MAC_REG_TXDMACTL0)
#define MACvTransmitAC0(iobase) mac_v(iobase, MAC_REG_AC0DMACTL)