diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-23 01:40:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-26 21:34:29 -0400 |
commit | 807540baae406c84dcb9c1c8ef07a56d2d2ae84a (patch) | |
tree | ccd5c2cb57710dd6b73cf8df11eedf67abc14ae4 /drivers/net/niu.c | |
parent | cb4dfe562cac6fcb544df752e40c1d78000d0712 (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/niu.c')
-rw-r--r-- | drivers/net/niu.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index e36a83845a1c..4cd92421708d 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -283,7 +283,7 @@ static int niu_enable_interrupts(struct niu *np, int on) | |||
283 | 283 | ||
284 | static u32 phy_encode(u32 type, int port) | 284 | static u32 phy_encode(u32 type, int port) |
285 | { | 285 | { |
286 | return (type << (port * 2)); | 286 | return type << (port * 2); |
287 | } | 287 | } |
288 | 288 | ||
289 | static u32 phy_decode(u32 val, int port) | 289 | static u32 phy_decode(u32 val, int port) |
@@ -3043,8 +3043,7 @@ static int tcam_flush_all(struct niu *np) | |||
3043 | 3043 | ||
3044 | static u64 hash_addr_regval(unsigned long index, unsigned long num_entries) | 3044 | static u64 hash_addr_regval(unsigned long index, unsigned long num_entries) |
3045 | { | 3045 | { |
3046 | return ((u64)index | (num_entries == 1 ? | 3046 | return (u64)index | (num_entries == 1 ? HASH_TBL_ADDR_AUTOINC : 0); |
3047 | HASH_TBL_ADDR_AUTOINC : 0)); | ||
3048 | } | 3047 | } |
3049 | 3048 | ||
3050 | #if 0 | 3049 | #if 0 |
@@ -3276,7 +3275,7 @@ static u16 tcam_get_index(struct niu *np, u16 idx) | |||
3276 | /* One entry reserved for IP fragment rule */ | 3275 | /* One entry reserved for IP fragment rule */ |
3277 | if (idx >= (np->clas.tcam_sz - 1)) | 3276 | if (idx >= (np->clas.tcam_sz - 1)) |
3278 | idx = 0; | 3277 | idx = 0; |
3279 | return (np->clas.tcam_top + ((idx+1) * np->parent->num_ports)); | 3278 | return np->clas.tcam_top + ((idx+1) * np->parent->num_ports); |
3280 | } | 3279 | } |
3281 | 3280 | ||
3282 | static u16 tcam_get_size(struct niu *np) | 3281 | static u16 tcam_get_size(struct niu *np) |
@@ -3313,7 +3312,7 @@ static unsigned int niu_hash_rxaddr(struct rx_ring_info *rp, u64 a) | |||
3313 | a >>= PAGE_SHIFT; | 3312 | a >>= PAGE_SHIFT; |
3314 | a ^= (a >> ilog2(MAX_RBR_RING_SIZE)); | 3313 | a ^= (a >> ilog2(MAX_RBR_RING_SIZE)); |
3315 | 3314 | ||
3316 | return (a & (MAX_RBR_RING_SIZE - 1)); | 3315 | return a & (MAX_RBR_RING_SIZE - 1); |
3317 | } | 3316 | } |
3318 | 3317 | ||
3319 | static struct page *niu_find_rxpage(struct rx_ring_info *rp, u64 addr, | 3318 | static struct page *niu_find_rxpage(struct rx_ring_info *rp, u64 addr, |
@@ -7796,11 +7795,11 @@ static int niu_get_sset_count(struct net_device *dev, int stringset) | |||
7796 | if (stringset != ETH_SS_STATS) | 7795 | if (stringset != ETH_SS_STATS) |
7797 | return -EINVAL; | 7796 | return -EINVAL; |
7798 | 7797 | ||
7799 | return ((np->flags & NIU_FLAGS_XMAC ? | 7798 | return (np->flags & NIU_FLAGS_XMAC ? |
7800 | NUM_XMAC_STAT_KEYS : | 7799 | NUM_XMAC_STAT_KEYS : |
7801 | NUM_BMAC_STAT_KEYS) + | 7800 | NUM_BMAC_STAT_KEYS) + |
7802 | (np->num_rx_rings * NUM_RXCHAN_STAT_KEYS) + | 7801 | (np->num_rx_rings * NUM_RXCHAN_STAT_KEYS) + |
7803 | (np->num_tx_rings * NUM_TXCHAN_STAT_KEYS)); | 7802 | (np->num_tx_rings * NUM_TXCHAN_STAT_KEYS); |
7804 | } | 7803 | } |
7805 | 7804 | ||
7806 | static void niu_get_ethtool_stats(struct net_device *dev, | 7805 | static void niu_get_ethtool_stats(struct net_device *dev, |