From: Amy Parker <enbyamy@gmail.com>
To: davem@davemloft.net, kuba@kernel.org, akpm@linux-foundation.org,
rppt@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Amy Parker <enbyamy@gmail.com>
Subject: [PATCH 2/3] drivers/net/ethernet/amd: Fix bracket matching and line levels
Date: Fri, 5 Feb 2021 16:01:45 -0800 [thread overview]
Message-ID: <20210206000146.616465-3-enbyamy@gmail.com> (raw)
In-Reply-To: <20210206000146.616465-1-enbyamy@gmail.com>
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@gmail.com>
---
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
next prev parent reply other threads:[~2021-02-06 2:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 0:01 [PATCH 0/3] drivers/net/ethernet/amd: Follow style guide Amy Parker
2021-02-06 0:01 ` [PATCH 1/3] drivers/net/ethernet/amd: Correct spacing around C keywords Amy Parker
2021-02-06 0:01 ` Amy Parker [this message]
2021-02-06 0:01 ` [PATCH 3/3] drivers/net/ethernet/amd: Break apart one-lined expressions Amy Parker
2021-02-06 3:16 ` [PATCH 0/3] drivers/net/ethernet/amd: Follow style guide Randy Dunlap
2021-02-06 4:28 ` Amy Parker
2021-02-06 20:07 ` Jakub Kicinski
2021-02-07 20:48 ` Amy Parker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210206000146.616465-3-enbyamy@gmail.com \
--to=enbyamy@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rppt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).