diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2010-07-11 05:31:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-11 20:07:43 -0400 |
commit | be98da6a10f3e7f855f36f3fdd67a91366cabc1c (patch) | |
tree | 685268063d555928db246d635ad8ec16f330891a /drivers/net/tg3.c | |
parent | 702e52ccd32164a09ea91aa5896ad7c64cb708cb (diff) |
tg3: Fix some checkpatch errors
This patch fixes the following checkpatch errors:
ERROR: do not use assignment in if condition
+ if ((mss = skb_shinfo(skb)->gso_size) != 0) {
ERROR: do not use assignment in if condition
+ if ((mss = skb_shinfo(skb)->gso_size) != 0) {
ERROR: space prohibited after that '!' (ctx:BxW)
+ if (! netif_carrier_ok(tp->dev) &&
^
ERROR: space required after that ',' (ctx:VxV)
+#define GET_REG32_LOOP(base,len) \
^
ERROR: "(foo*)" should be "(foo *)"
+ memcpy(data, ((char*)&val) + b_offset, b_count);
ERROR: do not use assignment in if condition
+ if ((err = tg3_do_mem_test(tp, mem_tbl[i].offset,
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index f61a4d8f012f..7116a473e533 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -5574,8 +5574,8 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, | |||
5574 | 5574 | ||
5575 | entry = tnapi->tx_prod; | 5575 | entry = tnapi->tx_prod; |
5576 | base_flags = 0; | 5576 | base_flags = 0; |
5577 | mss = 0; | 5577 | mss = skb_shinfo(skb)->gso_size; |
5578 | if ((mss = skb_shinfo(skb)->gso_size) != 0) { | 5578 | if (mss) { |
5579 | int tcp_opt_len, ip_tcp_len; | 5579 | int tcp_opt_len, ip_tcp_len; |
5580 | u32 hdrlen; | 5580 | u32 hdrlen; |
5581 | 5581 | ||
@@ -5781,7 +5781,8 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb, | |||
5781 | if (skb->ip_summed == CHECKSUM_PARTIAL) | 5781 | if (skb->ip_summed == CHECKSUM_PARTIAL) |
5782 | base_flags |= TXD_FLAG_TCPUDP_CSUM; | 5782 | base_flags |= TXD_FLAG_TCPUDP_CSUM; |
5783 | 5783 | ||
5784 | if ((mss = skb_shinfo(skb)->gso_size) != 0) { | 5784 | mss = skb_shinfo(skb)->gso_size; |
5785 | if (mss) { | ||
5785 | struct iphdr *iph; | 5786 | struct iphdr *iph; |
5786 | u32 tcp_opt_len, hdr_len; | 5787 | u32 tcp_opt_len, hdr_len; |
5787 | 5788 | ||
@@ -8514,7 +8515,7 @@ static void tg3_timer(unsigned long __opaque) | |||
8514 | (mac_stat & MAC_STATUS_LNKSTATE_CHANGED)) { | 8515 | (mac_stat & MAC_STATUS_LNKSTATE_CHANGED)) { |
8515 | need_setup = 1; | 8516 | need_setup = 1; |
8516 | } | 8517 | } |
8517 | if (! netif_carrier_ok(tp->dev) && | 8518 | if (!netif_carrier_ok(tp->dev) && |
8518 | (mac_stat & (MAC_STATUS_PCS_SYNCED | | 8519 | (mac_stat & (MAC_STATUS_PCS_SYNCED | |
8519 | MAC_STATUS_SIGNAL_DET))) { | 8520 | MAC_STATUS_SIGNAL_DET))) { |
8520 | need_setup = 1; | 8521 | need_setup = 1; |
@@ -9372,7 +9373,7 @@ static void tg3_get_regs(struct net_device *dev, | |||
9372 | tg3_full_lock(tp, 0); | 9373 | tg3_full_lock(tp, 0); |
9373 | 9374 | ||
9374 | #define __GET_REG32(reg) (*(p)++ = tr32(reg)) | 9375 | #define __GET_REG32(reg) (*(p)++ = tr32(reg)) |
9375 | #define GET_REG32_LOOP(base,len) \ | 9376 | #define GET_REG32_LOOP(base, len) \ |
9376 | do { p = (u32 *)(orig_p + (base)); \ | 9377 | do { p = (u32 *)(orig_p + (base)); \ |
9377 | for (i = 0; i < len; i += 4) \ | 9378 | for (i = 0; i < len; i += 4) \ |
9378 | __GET_REG32((base) + i); \ | 9379 | __GET_REG32((base) + i); \ |
@@ -9465,7 +9466,7 @@ static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, | |||
9465 | ret = tg3_nvram_read_be32(tp, offset-b_offset, &val); | 9466 | ret = tg3_nvram_read_be32(tp, offset-b_offset, &val); |
9466 | if (ret) | 9467 | if (ret) |
9467 | return ret; | 9468 | return ret; |
9468 | memcpy(data, ((char*)&val) + b_offset, b_count); | 9469 | memcpy(data, ((char *)&val) + b_offset, b_count); |
9469 | len -= b_count; | 9470 | len -= b_count; |
9470 | offset += b_count; | 9471 | offset += b_count; |
9471 | eeprom->len += b_count; | 9472 | eeprom->len += b_count; |
@@ -10585,8 +10586,8 @@ static int tg3_test_memory(struct tg3 *tp) | |||
10585 | mem_tbl = mem_tbl_570x; | 10586 | mem_tbl = mem_tbl_570x; |
10586 | 10587 | ||
10587 | for (i = 0; mem_tbl[i].offset != 0xffffffff; i++) { | 10588 | for (i = 0; mem_tbl[i].offset != 0xffffffff; i++) { |
10588 | if ((err = tg3_do_mem_test(tp, mem_tbl[i].offset, | 10589 | err = tg3_do_mem_test(tp, mem_tbl[i].offset, mem_tbl[i].len); |
10589 | mem_tbl[i].len)) != 0) | 10590 | if (err) |
10590 | break; | 10591 | break; |
10591 | } | 10592 | } |
10592 | 10593 | ||