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

From: Amy Parker
Date: Fri Feb 05 2021 - 22:34:38 EST


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 <enbyamy@xxxxxxxxx>
---
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