2021-02-06 02:39:55

by Amy Parker

[permalink] [raw]
Subject: [PATCH 0/3] drivers/net/ethernet/amd: Follow style guide

This patchset updates atarilance.c and sun3lance.c to follow the kernel
style guide. Each patch tackles a different issue in the style guide.

-Amy IP

Amy Parker (3):
drivers/net/ethernet/amd: Correct spacing around C keywords
drivers/net/ethernet/amd: Fix bracket matching and line levels
drivers/net/ethernet/amd: Break apart one-lined expressions

drivers/net/ethernet/amd/atarilance.c | 64 ++++++++++++++-------------
drivers/net/ethernet/amd/sun3lance.c | 64 +++++++++++++++------------
2 files changed, 69 insertions(+), 59 deletions(-)

--
2.29.2


2021-02-06 03:12:43

by Amy Parker

[permalink] [raw]
Subject: [PATCH 3/3] drivers/net/ethernet/amd: Break apart one-lined expressions

Some expressions using C keywords - especially if expressions - are
crammed onto one line. The kernel style guide indicates not to do
this, as it harms readability. This patch splits these one-lined
statements into two lines.

Signed-off-by: Amy Parker <[email protected]>
---
drivers/net/ethernet/amd/atarilance.c | 15 ++++++++++-----
drivers/net/ethernet/amd/sun3lance.c | 27 ++++++++++++++++++---------
2 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c
index 9ec44cf4ba9c..3e264a52307e 100644
--- a/drivers/net/ethernet/amd/atarilance.c
+++ b/drivers/net/ethernet/amd/atarilance.c
@@ -481,27 +481,32 @@ static unsigned long __init lance_probe1( struct net_device *dev,

/* Test whether memory readable and writable */
PROBE_PRINT(( "lance_probe1: testing memory to be accessible\n" ));
- if (!addr_accessible( memaddr, 1, 1 )) goto probe_fail;
+ if (!addr_accessible(memaddr, 1, 1))
+ goto probe_fail;

/* Written values should come back... */
PROBE_PRINT(( "lance_probe1: testing memory to be writable (1)\n" ));
save1 = *memaddr;
*memaddr = 0x0001;
- if (*memaddr != 0x0001) goto probe_fail;
+ if (*memaddr != 0x0001)
+ goto probe_fail;
PROBE_PRINT(( "lance_probe1: testing memory to be writable (2)\n" ));
*memaddr = 0x0000;
- if (*memaddr != 0x0000) goto probe_fail;
+ if (*memaddr != 0x0000)
+ goto probe_fail;
*memaddr = save1;

/* First port should be readable and writable */
PROBE_PRINT(( "lance_probe1: testing ioport to be accessible\n" ));
- if (!addr_accessible( ioaddr, 1, 1 )) goto probe_fail;
+ if (!addr_accessible(ioaddr, 1, 1))
+ goto probe_fail;

/* and written values should be readable */
PROBE_PRINT(( "lance_probe1: testing ioport to be writeable\n" ));
save2 = ioaddr[1];
ioaddr[1] = 0x0001;
- if (ioaddr[1] != 0x0001) goto probe_fail;
+ if (ioaddr[1] != 0x0001)
+ goto probe_fail;

/* The CSR0_INIT bit should not be readable */
PROBE_PRINT(( "lance_probe1: testing CSR0 register function (1)\n" ));
diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
index c7af742f63ad..88fce468e848 100644
--- a/drivers/net/ethernet/amd/sun3lance.c
+++ b/drivers/net/ethernet/amd/sun3lance.c
@@ -699,9 +699,12 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id)
if (head->flag & TMD1_ERR) {
int status = head->misc;
dev->stats.tx_errors++;
- if (status & TMD3_RTRY) dev->stats.tx_aborted_errors++;
- if (status & TMD3_LCAR) dev->stats.tx_carrier_errors++;
- if (status & TMD3_LCOL) dev->stats.tx_window_errors++;
+ if (status & TMD3_RTRY)
+ dev->stats.tx_aborted_errors++;
+ if (status & TMD3_LCAR)
+ dev->stats.tx_carrier_errors++;
+ if (status & TMD3_LCOL)
+ dev->stats.tx_window_errors++;
if (status & (TMD3_UFLO | TMD3_BUFF)) {
dev->stats.tx_fifo_errors++;
printk("%s: Tx FIFO error\n",
@@ -738,8 +741,10 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id)
lance_rx( dev );

/* Log misc errors. */
- if (csr0 & CSR0_BABL) dev->stats.tx_errors++; /* Tx babble. */
- if (csr0 & CSR0_MISS) dev->stats.rx_errors++; /* Missed a Rx frame. */
+ if (csr0 & CSR0_BABL)
+ dev->stats.tx_errors++; /* Tx babble. */
+ if (csr0 & CSR0_MISS)
+ dev->stats.rx_errors++; /* Missed a Rx frame. */
if (csr0 & CSR0_MERR) {
DPRINTK( 1, ( "%s: Bus master arbitration failure (?!?), "
"status %04x.\n", dev->name, csr0 ));
@@ -785,10 +790,14 @@ static int lance_rx( struct net_device *dev )
buffers, with only the last correctly noting the error. */
if (status & RMD1_ENP) /* Only count a general error at the */
dev->stats.rx_errors++; /* end of a packet.*/
- if (status & RMD1_FRAM) dev->stats.rx_frame_errors++;
- if (status & RMD1_OFLO) dev->stats.rx_over_errors++;
- if (status & RMD1_CRC) dev->stats.rx_crc_errors++;
- if (status & RMD1_BUFF) dev->stats.rx_fifo_errors++;
+ if (status & RMD1_FRAM)
+ dev->stats.rx_frame_errors++;
+ if (status & RMD1_OFLO)
+ dev->stats.rx_over_errors++;
+ if (status & RMD1_CRC)
+ dev->stats.rx_crc_errors++;
+ if (status & RMD1_BUFF)
+ dev->stats.rx_fifo_errors++;
head->flag &= (RMD1_ENP|RMD1_STP);
} else {
/* Malloc up new buffer, compatible with net-3. */
--
2.29.2

2021-02-06 03:34:46

by Amy Parker

[permalink] [raw]
Subject: [PATCH 2/3] drivers/net/ethernet/amd: Fix bracket matching and line levels

Some statements - often if statements - do not follow the kernel
style guide regarding what lines brackets and pairs should be on.
This patch fixes those style violations.

Signed-off-by: Amy Parker <[email protected]>
---
drivers/net/ethernet/amd/atarilance.c | 13 +++++--------
drivers/net/ethernet/amd/sun3lance.c | 7 +++----
2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c
index 141244c5ca4e..9ec44cf4ba9c 100644
--- a/drivers/net/ethernet/amd/atarilance.c
+++ b/drivers/net/ethernet/amd/atarilance.c
@@ -543,12 +543,11 @@ static unsigned long __init lance_probe1( struct net_device *dev,
/* Switch back to Ram */
i = IO->mem;
lp->cardtype = PAM_CARD;
- }
- else if (*RIEBL_MAGIC_ADDR == RIEBL_MAGIC) {
+ } else if (*RIEBL_MAGIC_ADDR == RIEBL_MAGIC) {
lp->cardtype = NEW_RIEBL;
- }
- else
+ } else {
lp->cardtype = OLD_RIEBL;
+ }

if (lp->cardtype == PAM_CARD ||
memaddr == (unsigned short *)0xffe00000) {
@@ -559,8 +558,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
return 0;
}
dev->irq = IRQ_AUTO_5;
- }
- else {
+ } else {
/* For VME-RieblCards, request a free VME int */
unsigned int irq = atari_register_vme_int();
if (!irq) {
@@ -993,8 +991,7 @@ static int lance_rx( struct net_device *dev )
if (pkt_len < 60) {
printk( "%s: Runt packet!\n", dev->name );
dev->stats.rx_errors++;
- }
- else {
+ } else {
skb = netdev_alloc_skb(dev, pkt_len + 2);
if (skb == NULL) {
for (i = 0; i < RX_RING_SIZE; i++)
diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
index ca7b6e483d2a..c7af742f63ad 100644
--- a/drivers/net/ethernet/amd/sun3lance.c
+++ b/drivers/net/ethernet/amd/sun3lance.c
@@ -757,7 +757,7 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id)

REGA(CSR0) = CSR0_INEA;

- if(DREG & (CSR0_RINT | CSR0_TINT)) {
+ if (DREG & (CSR0_RINT | CSR0_TINT)) {
DPRINTK(2, ("restarting interrupt, csr0=%#04x\n", DREG));
goto still_more;
}
@@ -774,7 +774,7 @@ static int lance_rx( struct net_device *dev )
int entry = lp->new_rx;

/* If we own the next entry, it's a new packet. Send it up. */
- while( (MEM->rx_head[entry].flag & RMD1_OWN) == RMD1_OWN_HOST ) {
+ while ((MEM->rx_head[entry].flag & RMD1_OWN) == RMD1_OWN_HOST) {
struct lance_rx_head *head = &(MEM->rx_head[entry]);
int status = head->flag;

@@ -799,8 +799,7 @@ static int lance_rx( struct net_device *dev )
if (pkt_len < 60) {
printk( "%s: Runt packet!\n", dev->name );
dev->stats.rx_errors++;
- }
- else {
+ } else {
skb = netdev_alloc_skb(dev, pkt_len + 2);
if (skb == NULL) {
dev->stats.rx_dropped++;
--
2.29.2

2021-02-06 03:45:58

by Amy Parker

[permalink] [raw]
Subject: [PATCH 1/3] drivers/net/ethernet/amd: Correct spacing around C keywords

Many C keywords and their statements are not formatted correctly
per the kernel style guide. Their spacing makes them harder to read
and to maintain. This patch updates their spacing to follow the
style guide.

Signed-off-by: Amy Parker <[email protected]>
---
drivers/net/ethernet/amd/atarilance.c | 36 +++++++++++++--------------
drivers/net/ethernet/amd/sun3lance.c | 30 +++++++++++-----------
2 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c
index 961796abab35..141244c5ca4e 100644
--- a/drivers/net/ethernet/amd/atarilance.c
+++ b/drivers/net/ethernet/amd/atarilance.c
@@ -88,7 +88,7 @@ MODULE_LICENSE("GPL");
do { \
if (lance_debug >= n) \
printk a; \
- } while( 0 )
+ } while (0)

#ifdef LANCE_DEBUG_PROBE
# define PROBE_PRINT(a) printk a
@@ -359,7 +359,7 @@ static void *slow_memcpy( void *dst, const void *src, size_t len )
{ char *cto = dst;
const char *cfrom = src;

- while( len-- ) {
+ while (len--) {
*cto++ = *cfrom++;
MFPDELAY();
}
@@ -387,7 +387,7 @@ struct net_device * __init atarilance_probe(int unit)
netdev_boot_setup_check(dev);
}

- for( i = 0; i < N_LANCE_ADDR; ++i ) {
+ for (i = 0; i < N_LANCE_ADDR; ++i) {
if (lance_probe1( dev, &lance_addr_list[i] )) {
found = 1;
err = register_netdev(dev);
@@ -583,7 +583,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
init_rec->slow_flag ? " (slow memcpy)" : "" );

/* Get the ethernet address */
- switch( lp->cardtype ) {
+ switch (lp->cardtype) {
case OLD_RIEBL:
/* No ethernet address! (Set some default address) */
memcpy(dev->dev_addr, OldRieblDefHwaddr, ETH_ALEN);
@@ -593,7 +593,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
break;
case PAM_CARD:
i = IO->eeprom;
- for( i = 0; i < 6; ++i )
+ for (i = 0; i < 6; ++i)
dev->dev_addr[i] =
((((unsigned short *)MEM)[i*2] & 0x0f) << 4) |
((((unsigned short *)MEM)[i*2+1] & 0x0f));
@@ -610,7 +610,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
spin_lock_init(&lp->devlock);

MEM->init.mode = 0x0000; /* Disable Rx and Tx. */
- for( i = 0; i < 6; i++ )
+ for (i = 0; i < 6; i++)
MEM->init.hwaddr[i] = dev->dev_addr[i^1]; /* <- 16 bit swap! */
MEM->init.filter[0] = 0x00000000;
MEM->init.filter[1] = 0x00000000;
@@ -700,9 +700,9 @@ static void lance_init_ring( struct net_device *dev )
: (o) < RIEBL_RSVD_END) \
(o) = RIEBL_RSVD_END; \
} \
- } while(0)
+ } while (0)

- for( i = 0; i < TX_RING_SIZE; i++ ) {
+ for (i = 0; i < TX_RING_SIZE; i++) {
CHECK_OFFSET(offset);
MEM->tx_head[i].base = offset;
MEM->tx_head[i].flag = TMD1_OWN_HOST;
@@ -712,7 +712,7 @@ static void lance_init_ring( struct net_device *dev )
offset += PKT_BUF_SZ;
}

- for( i = 0; i < RX_RING_SIZE; i++ ) {
+ for (i = 0; i < RX_RING_SIZE; i++) {
CHECK_OFFSET(offset);
MEM->rx_head[i].base = offset;
MEM->rx_head[i].flag = TMD1_OWN_CHIP;
@@ -748,12 +748,12 @@ static void lance_tx_timeout (struct net_device *dev, unsigned int txqueue)
lp->dirty_tx, lp->cur_tx,
lp->tx_full ? " (full)" : "",
lp->cur_rx ));
- for( i = 0 ; i < RX_RING_SIZE; i++ )
+ for (i = 0 ; i < RX_RING_SIZE; i++)
DPRINTK( 2, ( "rx #%d: base=%04x blen=%04x mlen=%04x\n",
i, MEM->rx_head[i].base,
-MEM->rx_head[i].buf_length,
MEM->rx_head[i].msg_length ));
- for( i = 0 ; i < TX_RING_SIZE; i++ )
+ for (i = 0 ; i < TX_RING_SIZE; i++)
DPRINTK( 2, ( "tx #%d: base=%04x len=%04x misc=%04x\n",
i, MEM->tx_head[i].base,
-MEM->tx_head[i].length,
@@ -827,7 +827,7 @@ lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_bytes += skb->len;
dev_kfree_skb( skb );
lp->cur_tx++;
- while( lp->cur_tx >= TX_RING_SIZE && lp->dirty_tx >= TX_RING_SIZE ) {
+ while (lp->cur_tx >= TX_RING_SIZE && lp->dirty_tx >= TX_RING_SIZE) {
lp->cur_tx -= TX_RING_SIZE;
lp->dirty_tx -= TX_RING_SIZE;
}
@@ -866,7 +866,7 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id )

AREG = CSR0;

- while( ((csr0 = DREG) & (CSR0_ERR | CSR0_TINT | CSR0_RINT)) &&
+ while (((csr0 = DREG) & (CSR0_ERR | CSR0_TINT | CSR0_RINT)) &&
--boguscnt >= 0) {
handled = 1;
/* Acknowledge all of the current interrupt sources ASAP. */
@@ -882,7 +882,7 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id )
if (csr0 & CSR0_TINT) { /* Tx-done interrupt */
int dirty_tx = lp->dirty_tx;

- while( dirty_tx < lp->cur_tx) {
+ while (dirty_tx < lp->cur_tx) {
int entry = dirty_tx & TX_RING_MOD_MASK;
int status = MEM->tx_head[entry].flag;

@@ -969,7 +969,7 @@ static int lance_rx( struct net_device *dev )
MEM->rx_head[entry].flag ));

/* If we own the next entry, it's a new packet. Send it up. */
- while( (MEM->rx_head[entry].flag & RMD1_OWN) == RMD1_OWN_HOST ) {
+ while ((MEM->rx_head[entry].flag & RMD1_OWN) == RMD1_OWN_HOST) {
struct lance_rx_head *head = &(MEM->rx_head[entry]);
int status = head->flag;

@@ -997,7 +997,7 @@ static int lance_rx( struct net_device *dev )
else {
skb = netdev_alloc_skb(dev, pkt_len + 2);
if (skb == NULL) {
- for( i = 0; i < RX_RING_SIZE; i++ )
+ for (i = 0; i < RX_RING_SIZE; i++)
if (MEM->rx_head[(entry+i) & RX_RING_MOD_MASK].flag &
RMD1_OWN_CHIP)
break;
@@ -1093,7 +1093,7 @@ static void set_multicast_list( struct net_device *dev )
* filtering. */
memset( multicast_table, (num_addrs == 0) ? 0 : -1,
sizeof(multicast_table) );
- for( i = 0; i < 4; i++ )
+ for (i = 0; i < 4; i++)
REGA( CSR8+i ) = multicast_table[i];
REGA( CSR15 ) = 0; /* Unset promiscuous mode */
}
@@ -1128,7 +1128,7 @@ static int lance_set_mac_address( struct net_device *dev, void *addr )
}

memcpy( dev->dev_addr, saddr->sa_data, dev->addr_len );
- for( i = 0; i < 6; i++ )
+ for (i = 0; i < 6; i++)
MEM->init.hwaddr[i] = dev->dev_addr[i^1]; /* <- 16 bit swap! */
lp->memcpy_f( RIEBL_HWADDR_ADDR, dev->dev_addr, 6 );
/* set also the magic for future sessions */
diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
index 00ae1081254d..ca7b6e483d2a 100644
--- a/drivers/net/ethernet/amd/sun3lance.c
+++ b/drivers/net/ethernet/amd/sun3lance.c
@@ -80,7 +80,7 @@ MODULE_LICENSE("GPL");
do { \
if (lance_debug >= n) \
printk a; \
- } while( 0 )
+ } while (0)


/* we're only using 32k of memory, so we use 4 TX
@@ -332,7 +332,7 @@ static int __init lance_probe( struct net_device *dev)
ioaddr_probe[1] = CSR0;
ioaddr_probe[0] = CSR0_INIT | CSR0_STOP;

- if(ioaddr_probe[0] != CSR0_STOP) {
+ if (ioaddr_probe[0] != CSR0_STOP) {
ioaddr_probe[0] = tmp1;
ioaddr_probe[1] = tmp2;

@@ -377,7 +377,7 @@ static int __init lance_probe( struct net_device *dev)
dev->irq);

/* copy in the ethernet address from the prom */
- for(i = 0; i < 6 ; i++)
+ for (i = 0; i < 6 ; i++)
dev->dev_addr[i] = idprom->id_ethaddr[i];

/* tell the card it's ether address, bytes swapped */
@@ -462,7 +462,7 @@ static void lance_init_ring( struct net_device *dev )
lp->new_rx = lp->new_tx = 0;
lp->old_rx = lp->old_tx = 0;

- for( i = 0; i < TX_RING_SIZE; i++ ) {
+ for (i = 0; i < TX_RING_SIZE; i++) {
MEM->tx_head[i].base = dvma_vtob(MEM->tx_data[i]);
MEM->tx_head[i].flag = 0;
MEM->tx_head[i].base_hi =
@@ -471,7 +471,7 @@ static void lance_init_ring( struct net_device *dev )
MEM->tx_head[i].misc = 0;
}

- for( i = 0; i < RX_RING_SIZE; i++ ) {
+ for (i = 0; i < RX_RING_SIZE; i++) {
MEM->rx_head[i].base = dvma_vtob(MEM->rx_data[i]);
MEM->rx_head[i].flag = RMD1_OWN_CHIP;
MEM->rx_head[i].base_hi =
@@ -539,18 +539,18 @@ lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
REGA(CSR3) = CSR3_BSWP;
dev->stats.tx_errors++;

- if(lance_debug >= 2) {
+ if (lance_debug >= 2) {
int i;
printk("Ring data: old_tx %d new_tx %d%s new_rx %d\n",
lp->old_tx, lp->new_tx,
lp->tx_full ? " (full)" : "",
lp->new_rx );
- for( i = 0 ; i < RX_RING_SIZE; i++ )
+ for (i = 0 ; i < RX_RING_SIZE; i++)
printk( "rx #%d: base=%04x blen=%04x mlen=%04x\n",
i, MEM->rx_head[i].base,
-MEM->rx_head[i].buf_length,
MEM->rx_head[i].msg_length);
- for( i = 0 ; i < TX_RING_SIZE; i++ )
+ for (i = 0 ; i < TX_RING_SIZE; i++)
printk("tx #%d: base=%04x len=%04x misc=%04x\n",
i, MEM->tx_head[i].base,
-MEM->tx_head[i].length,
@@ -586,7 +586,7 @@ lance_start_xmit(struct sk_buff *skb, struct net_device *dev)

#ifdef CONFIG_SUN3X
/* this weirdness doesn't appear on sun3... */
- if(!(DREG & CSR0_INIT)) {
+ if (!(DREG & CSR0_INIT)) {
DPRINTK( 1, ("INIT not set, reinitializing...\n"));
REGA( CSR0 ) = CSR0_STOP;
lance_init_ring(dev);
@@ -668,7 +668,7 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id)
DREG = csr0 & (CSR0_TINT | CSR0_RINT | CSR0_IDON);

/* clear errors */
- if(csr0 & CSR0_ERR)
+ if (csr0 & CSR0_ERR)
DREG = CSR0_BABL | CSR0_MERR | CSR0_CERR | CSR0_MISS;


@@ -688,7 +688,7 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id)
// MEM->tx_head[i].flag);
// }

- while( old_tx != lp->new_tx) {
+ while (old_tx != lp->new_tx) {
struct lance_tx_head *head = &(MEM->tx_head[old_tx]);

DPRINTK(3, ("on tx_ring %d\n", old_tx));
@@ -712,10 +712,10 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id)
REGA(CSR0) = CSR0_STRT | CSR0_INEA;
return IRQ_HANDLED;
}
- } else if(head->flag & (TMD1_ENP | TMD1_STP)) {
+ } else if (head->flag & (TMD1_ENP | TMD1_STP)) {

head->flag &= ~(TMD1_ENP | TMD1_STP);
- if(head->flag & (TMD1_ONE | TMD1_MORE))
+ if (head->flag & (TMD1_ONE | TMD1_MORE))
dev->stats.collisions++;

dev->stats.tx_packets++;
@@ -889,7 +889,7 @@ static void set_multicast_list( struct net_device *dev )
{
struct lance_private *lp = netdev_priv(dev);

- if(netif_queue_stopped(dev))
+ if (netif_queue_stopped(dev))
/* Only possible if board is already started */
return;

@@ -908,7 +908,7 @@ static void set_multicast_list( struct net_device *dev )
* filtering. */
memset( multicast_table, (num_addrs == 0) ? 0 : -1,
sizeof(multicast_table) );
- for( i = 0; i < 4; i++ )
+ for (i = 0; i < 4; i++)
REGA( CSR8+i ) = multicast_table[i];
REGA( CSR15 ) = 0; /* Unset promiscuous mode */
}
--
2.29.2

2021-02-06 04:32:59

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH 0/3] drivers/net/ethernet/amd: Follow style guide

On 2/5/21 4:01 PM, Amy Parker wrote:
> This patchset updates atarilance.c and sun3lance.c to follow the kernel
> style guide. Each patch tackles a different issue in the style guide.
>
> -Amy IP
>
> Amy Parker (3):
> drivers/net/ethernet/amd: Correct spacing around C keywords
> drivers/net/ethernet/amd: Fix bracket matching and line levels
> drivers/net/ethernet/amd: Break apart one-lined expressions
>
> drivers/net/ethernet/amd/atarilance.c | 64 ++++++++++++++-------------
> drivers/net/ethernet/amd/sun3lance.c | 64 +++++++++++++++------------
> 2 files changed, 69 insertions(+), 59 deletions(-)
>

Hi Amy,

For each patch, can you confirm that the before & after binary files
are the same? or if they are not the same, explain why not?

Just something that I have done in the past...

thanks.
--
~Randy

2021-02-06 05:13:27

by Amy Parker

[permalink] [raw]
Subject: Re: [PATCH 0/3] drivers/net/ethernet/amd: Follow style guide

On Fri, Feb 5, 2021 at 7:16 PM Randy Dunlap <[email protected]> wrote:
>
> On 2/5/21 4:01 PM, Amy Parker wrote:
> > This patchset updates atarilance.c and sun3lance.c to follow the kernel
> > style guide. Each patch tackles a different issue in the style guide.
> >
> > -Amy IP
> >
> > Amy Parker (3):
> > drivers/net/ethernet/amd: Correct spacing around C keywords
> > drivers/net/ethernet/amd: Fix bracket matching and line levels
> > drivers/net/ethernet/amd: Break apart one-lined expressions
> >
> > drivers/net/ethernet/amd/atarilance.c | 64 ++++++++++++++-------------
> > drivers/net/ethernet/amd/sun3lance.c | 64 +++++++++++++++------------
> > 2 files changed, 69 insertions(+), 59 deletions(-)
> >
>
> Hi Amy,
>
> For each patch, can you confirm that the before & after binary files
> are the same? or if they are not the same, explain why not?
>
> Just something that I have done in the past...
>
> thanks.

At least when I tried - yes. These are just stylistic changes.
Currently using gcc version 10.2.1.

-Amy IP

2021-02-06 20:12:31

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH 0/3] drivers/net/ethernet/amd: Follow style guide

On Fri, 5 Feb 2021 16:01:43 -0800 Amy Parker wrote:
> This patchset updates atarilance.c and sun3lance.c to follow the kernel
> style guide. Each patch tackles a different issue in the style guide.

These are very, very old drivers, nobody worked on them for a decade.
What's your motivation for making these changes?

2021-02-07 20:53:38

by Amy Parker

[permalink] [raw]
Subject: Re: [PATCH 0/3] drivers/net/ethernet/amd: Follow style guide

On Sat, Feb 6, 2021 at 12:07 PM Jakub Kicinski <[email protected]> wrote:
>
> On Fri, 5 Feb 2021 16:01:43 -0800 Amy Parker wrote:
> > This patchset updates atarilance.c and sun3lance.c to follow the kernel
> > style guide. Each patch tackles a different issue in the style guide.
>
> These are very, very old drivers, nobody worked on them for a decade.
> What's your motivation for making these changes?

I've just been trying to make patches to clean up code to follow the
style guide. These files had a lot of violations.