diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-17 19:51:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-17 19:54:08 -0400 |
commit | 585985429080a449e0ecf66dd485899a8765c26c (patch) | |
tree | 62522e96a99f85da7f24de193f052c9f423f97c5 | |
parent | 81b424d9e2ef815b2035d4c2be0bc41dddbebc06 (diff) |
bna: Fix set-but-unused variables.
The variable 'pgoff' is set but unused in bfa_nw_ioc_fwver_get()
and bfa_ioc_download_fw().
Similarly for 'cmd_h' in bna_mbox_flush_q and the entirety of
bna_rit_mod_uninit() is unused since variables are purely set but no
action is made using them.
Same for 'bna' in bna_rit_create() and 'ret' in bna_rx_create().
Just kill them off.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bna/bfa_ioc.c | 6 | ||||
-rw-r--r-- | drivers/net/bna/bna_ctrl.c | 21 | ||||
-rw-r--r-- | drivers/net/bna/bna_txrx.c | 7 |
3 files changed, 4 insertions, 30 deletions
diff --git a/drivers/net/bna/bfa_ioc.c b/drivers/net/bna/bfa_ioc.c index e3de0b8625cd..c1c9e70eec2f 100644 --- a/drivers/net/bna/bfa_ioc.c +++ b/drivers/net/bna/bfa_ioc.c | |||
@@ -1272,13 +1272,12 @@ bfa_ioc_lpu_stop(struct bfa_ioc *ioc) | |||
1272 | void | 1272 | void |
1273 | bfa_nw_ioc_fwver_get(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr) | 1273 | bfa_nw_ioc_fwver_get(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr) |
1274 | { | 1274 | { |
1275 | u32 pgnum, pgoff; | 1275 | u32 pgnum; |
1276 | u32 loff = 0; | 1276 | u32 loff = 0; |
1277 | int i; | 1277 | int i; |
1278 | u32 *fwsig = (u32 *) fwhdr; | 1278 | u32 *fwsig = (u32 *) fwhdr; |
1279 | 1279 | ||
1280 | pgnum = bfa_ioc_smem_pgnum(ioc, loff); | 1280 | pgnum = bfa_ioc_smem_pgnum(ioc, loff); |
1281 | pgoff = bfa_ioc_smem_pgoff(ioc, loff); | ||
1282 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); | 1281 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); |
1283 | 1282 | ||
1284 | for (i = 0; i < (sizeof(struct bfi_ioc_image_hdr) / sizeof(u32)); | 1283 | for (i = 0; i < (sizeof(struct bfi_ioc_image_hdr) / sizeof(u32)); |
@@ -1509,7 +1508,7 @@ bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type, | |||
1509 | u32 boot_param) | 1508 | u32 boot_param) |
1510 | { | 1509 | { |
1511 | u32 *fwimg; | 1510 | u32 *fwimg; |
1512 | u32 pgnum, pgoff; | 1511 | u32 pgnum; |
1513 | u32 loff = 0; | 1512 | u32 loff = 0; |
1514 | u32 chunkno = 0; | 1513 | u32 chunkno = 0; |
1515 | u32 i; | 1514 | u32 i; |
@@ -1522,7 +1521,6 @@ bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type, | |||
1522 | fwimg = bfa_cb_image_get_chunk(BFA_IOC_FWIMG_TYPE(ioc), chunkno); | 1521 | fwimg = bfa_cb_image_get_chunk(BFA_IOC_FWIMG_TYPE(ioc), chunkno); |
1523 | 1522 | ||
1524 | pgnum = bfa_ioc_smem_pgnum(ioc, loff); | 1523 | pgnum = bfa_ioc_smem_pgnum(ioc, loff); |
1525 | pgoff = bfa_ioc_smem_pgoff(ioc, loff); | ||
1526 | 1524 | ||
1527 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); | 1525 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); |
1528 | 1526 | ||
diff --git a/drivers/net/bna/bna_ctrl.c b/drivers/net/bna/bna_ctrl.c index e1527472b961..53b14169e363 100644 --- a/drivers/net/bna/bna_ctrl.c +++ b/drivers/net/bna/bna_ctrl.c | |||
@@ -246,7 +246,6 @@ static void | |||
246 | bna_mbox_flush_q(struct bna *bna, struct list_head *q) | 246 | bna_mbox_flush_q(struct bna *bna, struct list_head *q) |
247 | { | 247 | { |
248 | struct bna_mbox_qe *mb_qe = NULL; | 248 | struct bna_mbox_qe *mb_qe = NULL; |
249 | struct bfi_mhdr *cmd_h; | ||
250 | struct list_head *mb_q; | 249 | struct list_head *mb_q; |
251 | void (*cbfn)(void *arg, int status); | 250 | void (*cbfn)(void *arg, int status); |
252 | void *cbarg; | 251 | void *cbarg; |
@@ -260,7 +259,6 @@ bna_mbox_flush_q(struct bna *bna, struct list_head *q) | |||
260 | bfa_q_qe_init(mb_qe); | 259 | bfa_q_qe_init(mb_qe); |
261 | bna->mbox_mod.msg_pending--; | 260 | bna->mbox_mod.msg_pending--; |
262 | 261 | ||
263 | cmd_h = (struct bfi_mhdr *)(&mb_qe->cmd.msg[0]); | ||
264 | if (cbfn) | 262 | if (cbfn) |
265 | cbfn(cbarg, BNA_CB_NOT_EXEC); | 263 | cbfn(cbarg, BNA_CB_NOT_EXEC); |
266 | } | 264 | } |
@@ -2774,23 +2772,6 @@ bna_rit_mod_init(struct bna_rit_mod *rit_mod, | |||
2774 | } | 2772 | } |
2775 | } | 2773 | } |
2776 | 2774 | ||
2777 | static void | ||
2778 | bna_rit_mod_uninit(struct bna_rit_mod *rit_mod) | ||
2779 | { | ||
2780 | struct bna_rit_segment *rit_segment; | ||
2781 | struct list_head *qe; | ||
2782 | int i; | ||
2783 | int j; | ||
2784 | |||
2785 | for (i = 0; i < BFI_RIT_SEG_TOTAL_POOLS; i++) { | ||
2786 | j = 0; | ||
2787 | list_for_each(qe, &rit_mod->rit_seg_pool[i]) { | ||
2788 | rit_segment = (struct bna_rit_segment *)qe; | ||
2789 | j++; | ||
2790 | } | ||
2791 | } | ||
2792 | } | ||
2793 | |||
2794 | /* | 2775 | /* |
2795 | * Public functions | 2776 | * Public functions |
2796 | */ | 2777 | */ |
@@ -2977,8 +2958,6 @@ bna_uninit(struct bna *bna) | |||
2977 | 2958 | ||
2978 | bna_ucam_mod_uninit(&bna->ucam_mod); | 2959 | bna_ucam_mod_uninit(&bna->ucam_mod); |
2979 | 2960 | ||
2980 | bna_rit_mod_uninit(&bna->rit_mod); | ||
2981 | |||
2982 | bna_ib_mod_uninit(&bna->ib_mod); | 2961 | bna_ib_mod_uninit(&bna->ib_mod); |
2983 | 2962 | ||
2984 | bna_rx_mod_uninit(&bna->rx_mod); | 2963 | bna_rx_mod_uninit(&bna->rx_mod); |
diff --git a/drivers/net/bna/bna_txrx.c b/drivers/net/bna/bna_txrx.c index 58c7664040dc..380085cc3088 100644 --- a/drivers/net/bna/bna_txrx.c +++ b/drivers/net/bna/bna_txrx.c | |||
@@ -2229,14 +2229,11 @@ void | |||
2229 | bna_rit_create(struct bna_rx *rx) | 2229 | bna_rit_create(struct bna_rx *rx) |
2230 | { | 2230 | { |
2231 | struct list_head *qe_rxp; | 2231 | struct list_head *qe_rxp; |
2232 | struct bna *bna; | ||
2233 | struct bna_rxp *rxp; | 2232 | struct bna_rxp *rxp; |
2234 | struct bna_rxq *q0 = NULL; | 2233 | struct bna_rxq *q0 = NULL; |
2235 | struct bna_rxq *q1 = NULL; | 2234 | struct bna_rxq *q1 = NULL; |
2236 | int offset; | 2235 | int offset; |
2237 | 2236 | ||
2238 | bna = rx->bna; | ||
2239 | |||
2240 | offset = 0; | 2237 | offset = 0; |
2241 | list_for_each(qe_rxp, &rx->rxp_q) { | 2238 | list_for_each(qe_rxp, &rx->rxp_q) { |
2242 | rxp = (struct bna_rxp *)qe_rxp; | 2239 | rxp = (struct bna_rxp *)qe_rxp; |
@@ -2830,7 +2827,7 @@ bna_rx_create(struct bna *bna, struct bnad *bnad, | |||
2830 | struct bna_mem_descr *dsqpt_mem; /* s/w qpt for data */ | 2827 | struct bna_mem_descr *dsqpt_mem; /* s/w qpt for data */ |
2831 | struct bna_mem_descr *hpage_mem; /* hdr page mem */ | 2828 | struct bna_mem_descr *hpage_mem; /* hdr page mem */ |
2832 | struct bna_mem_descr *dpage_mem; /* data page mem */ | 2829 | struct bna_mem_descr *dpage_mem; /* data page mem */ |
2833 | int i, cpage_idx = 0, dpage_idx = 0, hpage_idx = 0, ret; | 2830 | int i, cpage_idx = 0, dpage_idx = 0, hpage_idx = 0; |
2834 | int dpage_count, hpage_count, rcb_idx; | 2831 | int dpage_count, hpage_count, rcb_idx; |
2835 | struct bna_ib_config ibcfg; | 2832 | struct bna_ib_config ibcfg; |
2836 | /* Fail if we don't have enough RXPs, RXQs */ | 2833 | /* Fail if we don't have enough RXPs, RXQs */ |
@@ -2924,7 +2921,7 @@ bna_rx_create(struct bna *bna, struct bnad *bnad, | |||
2924 | ibcfg.interpkt_timeo = BFI_RX_INTERPKT_TIMEO; | 2921 | ibcfg.interpkt_timeo = BFI_RX_INTERPKT_TIMEO; |
2925 | ibcfg.ctrl_flags = BFI_IB_CF_INT_ENABLE; | 2922 | ibcfg.ctrl_flags = BFI_IB_CF_INT_ENABLE; |
2926 | 2923 | ||
2927 | ret = bna_ib_config(rxp->cq.ib, &ibcfg); | 2924 | bna_ib_config(rxp->cq.ib, &ibcfg); |
2928 | 2925 | ||
2929 | /* Link rxqs to rxp */ | 2926 | /* Link rxqs to rxp */ |
2930 | _rxp_add_rxqs(rxp, q0, q1); | 2927 | _rxp_add_rxqs(rxp, q0, q1); |