summaryrefslogtreecommitdiff
path: root/drivers/net/wan/hd64570.c
diff options
context:
space:
mode:
authorPeng Li <lipeng321@huawei.com>2021-06-05 15:00:26 +0800
committerDavid S. Miller <davem@davemloft.net>2021-06-07 12:25:21 -0700
commit3f8b8db695fe79aa0ab007fac1f414e74ccd7146 (patch)
treef7e27daeb5f718f020e0a1ef61b47361ef37a08e /drivers/net/wan/hd64570.c
parentbc94e642e4bd37fa84405d7893e09b2cbf6b9af0 (diff)
net: hd64570: add braces {} to all arms of the statement
Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/hd64570.c')
-rw-r--r--drivers/net/wan/hd64570.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c
index f02cce05736a..0297fbe8b938 100644
--- a/drivers/net/wan/hd64570.c
+++ b/drivers/net/wan/hd64570.c
@@ -262,8 +262,9 @@ static inline void sca_rx(card_t *card, port_t *port, pkt_desc __iomem *desc,
memcpy_fromio(skb->data, winbase(card) + buff, maxlen);
openwin(card, page + 1);
memcpy_fromio(skb->data + maxlen, winbase(card), len - maxlen);
- } else
+ } else {
memcpy_fromio(skb->data, winbase(card) + buff, len);
+ }
#ifndef PAGE0_ALWAYS_MAPPED
openwin(card, 0); /* select pkt_desc table page back */
@@ -318,8 +319,9 @@ static inline void sca_rx_intr(port_t *port)
dev->stats.rx_crc_errors++;
if (stat & ST_RX_EOM)
port->rxpart = 0; /* received last fragment */
- } else
+ } else {
sca_rx(card, port, desc, port->rxin);
+ }
/* Set new error descriptor address */
sca_outw(desc_off, dmac + EDAL, card);
@@ -417,8 +419,9 @@ static void sca_set_port(port_t *port)
tmc = 1;
br = 0; /* For baud=CLOCK_BASE we use tmc=1 br=0 */
brv = 1;
- } else if (tmc > 255)
+ } else if (tmc > 255) {
tmc = 256; /* tmc=0 means 256 - low baud rates */
+ }
port->settings.clock_rate = CLOCK_BASE / brv / tmc;
} else {
@@ -651,8 +654,9 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev)
memcpy_toio(winbase(card) + buff, skb->data, maxlen);
openwin(card, page + 1);
memcpy_toio(winbase(card), skb->data + maxlen, len - maxlen);
- } else
+ } else {
memcpy_toio(winbase(card) + buff, skb->data, len);
+ }
#ifndef PAGE0_ALWAYS_MAPPED
openwin(card, 0); /* select pkt_desc table page back */