Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Peng Li and committed by
David S. Miller
3f8b8db6 bc94e642

+8 -4
+8 -4
drivers/net/wan/hd64570.c
··· 262 262 memcpy_fromio(skb->data, winbase(card) + buff, maxlen); 263 263 openwin(card, page + 1); 264 264 memcpy_fromio(skb->data + maxlen, winbase(card), len - maxlen); 265 - } else 265 + } else { 266 266 memcpy_fromio(skb->data, winbase(card) + buff, len); 267 + } 267 268 268 269 #ifndef PAGE0_ALWAYS_MAPPED 269 270 openwin(card, 0); /* select pkt_desc table page back */ ··· 319 318 dev->stats.rx_crc_errors++; 320 319 if (stat & ST_RX_EOM) 321 320 port->rxpart = 0; /* received last fragment */ 322 - } else 321 + } else { 323 322 sca_rx(card, port, desc, port->rxin); 323 + } 324 324 325 325 /* Set new error descriptor address */ 326 326 sca_outw(desc_off, dmac + EDAL, card); ··· 419 417 tmc = 1; 420 418 br = 0; /* For baud=CLOCK_BASE we use tmc=1 br=0 */ 421 419 brv = 1; 422 - } else if (tmc > 255) 420 + } else if (tmc > 255) { 423 421 tmc = 256; /* tmc=0 means 256 - low baud rates */ 422 + } 424 423 425 424 port->settings.clock_rate = CLOCK_BASE / brv / tmc; 426 425 } else { ··· 654 651 memcpy_toio(winbase(card) + buff, skb->data, maxlen); 655 652 openwin(card, page + 1); 656 653 memcpy_toio(winbase(card), skb->data + maxlen, len - maxlen); 657 - } else 654 + } else { 658 655 memcpy_toio(winbase(card) + buff, skb->data, len); 656 + } 659 657 660 658 #ifndef PAGE0_ALWAYS_MAPPED 661 659 openwin(card, 0); /* select pkt_desc table page back */