Messages in this thread | | | Subject | Re: [PATCH 1/6] staging: vt6655: Rename pbyEtherAddr to mac_addr | From | Joe Perches <> | Date | Mon, 04 Jul 2022 12:05:33 -0700 |
| |
On Mon, 2022-07-04 at 20:20 +0200, Philipp Hortmann wrote: > Fix name of a variable in two macros that use CamelCase which is not > accepted by checkpatch.pl
These might be nicer as functions with for loops
> diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
maybe something like:
static inline void MACvWriteBSSIDAddress(void __iomem *iobase, u8 *addr) { int i;
for (i = 0; i < ETH_ALEN; i++) iowrite8(*addr++, iobase + MAC_REG_BSSID0 + i); }
static inline void MACvReadEtherAddress(void __iomem *iobase, u8 *addr) { int i;
iowrite8(1, iobase + MAC_REG_PAGE1SEL); for (i = 0; i < ETH_ALEN; i++) *addr++ = ioread8(iobase + MAC_REG_PAR0 + i); iowrite8(0, iobase + MAC_REG_PAGE1SEL); }
| |