lkml.org 
[lkml]   [2022]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/6] staging: vt6655: Rename pbyEtherAddr to mac_addr
From
Date
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);
}

\
 
 \ /
  Last update: 2022-07-04 21:06    [W:0.048 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site