aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2012-10-02 23:31:14 -0400
committerDavid S. Miller <davem@davemloft.net>2012-10-02 23:21:34 -0400
commit864499449f256e32815575a9b860267ebefa6d70 (patch)
tree9dfe4020e3b0f79f3d2002ff371cf326dac3db21 /drivers/net
parent5316cf9a5197eb80b2800e1acadde287924ca975 (diff)
tg3: Fix sparse warnings.
drivers/net/ethernet/broadcom/tg3.c:8121:8: warning: symbol 'i' shadows an earlier one drivers/net/ethernet/broadcom/tg3.c:8003:6: originally declared here drivers/net/ethernet/broadcom/tg3.c:785:5: warning: symbol 'tg3_ape_scratchpad_read' was not declared. Should it be static? drivers/net/ethernet/broadcom/tg3.c:7781:19: warning: Using plain integer as NULL pointer drivers/net/ethernet/broadcom/tg3.c:10231:31: error: bad constant expression Reported-by: Fengguang Wu <fenguang.wu@intel.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 46280ba4c5d4..a8800ac10df9 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -782,7 +782,8 @@ static int tg3_ape_wait_for_event(struct tg3 *tp, u32 timeout_us)
782 return i == timeout_us / 10; 782 return i == timeout_us / 10;
783} 783}
784 784
785int tg3_ape_scratchpad_read(struct tg3 *tp, u32 *data, u32 base_off, u32 len) 785static int tg3_ape_scratchpad_read(struct tg3 *tp, u32 *data, u32 base_off,
786 u32 len)
786{ 787{
787 int err; 788 int err;
788 u32 i, bufoff, msgoff, maxlen, apedata; 789 u32 i, bufoff, msgoff, maxlen, apedata;
@@ -7763,7 +7764,7 @@ static int tg3_alloc_consistent(struct tg3 *tp)
7763 sblk = tnapi->hw_status; 7764 sblk = tnapi->hw_status;
7764 7765
7765 if (tg3_flag(tp, ENABLE_RSS)) { 7766 if (tg3_flag(tp, ENABLE_RSS)) {
7766 u16 *prodptr = 0; 7767 u16 *prodptr = NULL;
7767 7768
7768 /* 7769 /*
7769 * When RSS is enabled, the status block format changes 7770 * When RSS is enabled, the status block format changes
@@ -8103,11 +8104,11 @@ static int tg3_chip_reset(struct tg3 *tp)
8103 u16 val16; 8104 u16 val16;
8104 8105
8105 if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A0) { 8106 if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A0) {
8106 int i; 8107 int j;
8107 u32 cfg_val; 8108 u32 cfg_val;
8108 8109
8109 /* Wait for link training to complete. */ 8110 /* Wait for link training to complete. */
8110 for (i = 0; i < 5000; i++) 8111 for (j = 0; j < 5000; j++)
8111 udelay(100); 8112 udelay(100);
8112 8113
8113 pci_read_config_dword(tp->pdev, 0xc4, &cfg_val); 8114 pci_read_config_dword(tp->pdev, 0xc4, &cfg_val);
@@ -10206,7 +10207,7 @@ static u32 tg3_irq_count(struct tg3 *tp)
10206static bool tg3_enable_msix(struct tg3 *tp) 10207static bool tg3_enable_msix(struct tg3 *tp)
10207{ 10208{
10208 int i, rc; 10209 int i, rc;
10209 struct msix_entry msix_ent[tp->irq_max]; 10210 struct msix_entry msix_ent[TG3_IRQ_MAX_VECS];
10210 10211
10211 tp->txq_cnt = tp->txq_req; 10212 tp->txq_cnt = tp->txq_req;
10212 tp->rxq_cnt = tp->rxq_req; 10213 tp->rxq_cnt = tp->rxq_req;