aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/pc300_drv.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-09-23 01:40:09 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-26 21:34:29 -0400
commit807540baae406c84dcb9c1c8ef07a56d2d2ae84a (patch)
treeccd5c2cb57710dd6b73cf8df11eedf67abc14ae4 /drivers/net/wan/pc300_drv.c
parentcb4dfe562cac6fcb544df752e40c1d78000d0712 (diff)
drivers/net: return operator cleanup
Change "return (EXPR);" to "return EXPR;" return is not a function, parentheses are not required. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/pc300_drv.c')
-rw-r--r--drivers/net/wan/pc300_drv.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
index fbf1175a07f1..f875cfae3093 100644
--- a/drivers/net/wan/pc300_drv.c
+++ b/drivers/net/wan/pc300_drv.c
@@ -451,11 +451,11 @@ static int dma_get_rx_frame_size(pc300_t * card, int ch)
451 if ((status & DST_EOM) || (first_bd == card->chan[ch].rx_last_bd)) { 451 if ((status & DST_EOM) || (first_bd == card->chan[ch].rx_last_bd)) {
452 /* Return the size of a good frame or incomplete bad frame 452 /* Return the size of a good frame or incomplete bad frame
453 * (dma_buf_read will clean the buffer descriptors in this case). */ 453 * (dma_buf_read will clean the buffer descriptors in this case). */
454 return (rcvd); 454 return rcvd;
455 } 455 }
456 ptdescr = (card->hw.rambase + cpc_readl(&ptdescr->next)); 456 ptdescr = (card->hw.rambase + cpc_readl(&ptdescr->next));
457 } 457 }
458 return (-1); 458 return -1;
459} 459}
460 460
461/* 461/*
@@ -557,7 +557,7 @@ static int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb)
557 cpc_writel(card->hw.scabase + DRX_REG(EDAL, ch), 557 cpc_writel(card->hw.scabase + DRX_REG(EDAL, ch),
558 RX_BD_ADDR(ch, chan->rx_last_bd)); 558 RX_BD_ADDR(ch, chan->rx_last_bd));
559 } 559 }
560 return (rcvd); 560 return rcvd;
561} 561}
562 562
563static void tx_dma_stop(pc300_t * card, int ch) 563static void tx_dma_stop(pc300_t * card, int ch)
@@ -1733,7 +1733,7 @@ static u16 falc_pattern_test_error(pc300_t * card, int ch)
1733 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1733 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch];
1734 falc_t *pfalc = (falc_t *) & chan->falc; 1734 falc_t *pfalc = (falc_t *) & chan->falc;
1735 1735
1736 return (pfalc->bec); 1736 return pfalc->bec;
1737} 1737}
1738 1738
1739/**********************************/ 1739/**********************************/
@@ -2819,7 +2819,7 @@ static int clock_rate_calc(u32 rate, u32 clock, int *br_io)
2819 *br_io = 0; 2819 *br_io = 0;
2820 2820
2821 if (rate == 0) 2821 if (rate == 0)
2822 return (0); 2822 return 0;
2823 2823
2824 for (br = 0, br_pwr = 1; br <= 9; br++, br_pwr <<= 1) { 2824 for (br = 0, br_pwr = 1; br <= 9; br++, br_pwr <<= 1) {
2825 if ((tc = clock / br_pwr / rate) <= 0xff) { 2825 if ((tc = clock / br_pwr / rate) <= 0xff) {
@@ -2832,11 +2832,11 @@ static int clock_rate_calc(u32 rate, u32 clock, int *br_io)
2832 error = ((rate - (clock / br_pwr / rate)) / rate) * 1000; 2832 error = ((rate - (clock / br_pwr / rate)) / rate) * 1000;
2833 /* Errors bigger than +/- 1% won't be tolerated */ 2833 /* Errors bigger than +/- 1% won't be tolerated */
2834 if (error < -10 || error > 10) 2834 if (error < -10 || error > 10)
2835 return (-1); 2835 return -1;
2836 else 2836 else
2837 return (tc); 2837 return tc;
2838 } else { 2838 } else {
2839 return (-1); 2839 return -1;
2840 } 2840 }
2841} 2841}
2842 2842
@@ -3207,7 +3207,7 @@ static u32 detect_ram(pc300_t * card)
3207 break; 3207 break;
3208 } 3208 }
3209 } 3209 }
3210 return (i); 3210 return i;
3211} 3211}
3212 3212
3213static void plx_init(pc300_t * card) 3213static void plx_init(pc300_t * card)