Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bnx2x: Fix set-but-unused variables.

The variable 'rc' is set but unused in bnx2x_timer().

Similarly for 'hc_index_p' in bnx2x_init_sb(), and 'port' in
bnx2x_get_hwinfo().

Just kill them off.

Signed-off-by: David S. Miller <davem@davemloft.net>

+2 -7
+2 -7
drivers/net/bnx2x/bnx2x_main.c
··· 3904 3904 3905 3905 if (poll) { 3906 3906 struct bnx2x_fastpath *fp = &bp->fp[0]; 3907 - int rc; 3908 3907 3909 3908 bnx2x_tx_int(fp); 3910 - rc = bnx2x_rx_int(fp, 1000); 3909 + bnx2x_rx_int(fp, 1000); 3911 3910 } 3912 3911 3913 3912 if (!BP_NOMCP(bp)) { ··· 4061 4062 struct hc_status_block_data_e2 sb_data_e2; 4062 4063 struct hc_status_block_data_e1x sb_data_e1x; 4063 4064 struct hc_status_block_sm *hc_sm_p; 4064 - struct hc_index_data *hc_index_p; 4065 4065 int data_size; 4066 4066 u32 *sb_data_p; 4067 4067 ··· 4081 4083 sb_data_e2.common.host_sb_addr.hi = U64_HI(mapping); 4082 4084 sb_data_e2.common.host_sb_addr.lo = U64_LO(mapping); 4083 4085 hc_sm_p = sb_data_e2.common.state_machine; 4084 - hc_index_p = sb_data_e2.index_data; 4085 4086 sb_data_p = (u32 *)&sb_data_e2; 4086 4087 data_size = sizeof(struct hc_status_block_data_e2)/sizeof(u32); 4087 4088 } else { ··· 4094 4097 sb_data_e1x.common.host_sb_addr.hi = U64_HI(mapping); 4095 4098 sb_data_e1x.common.host_sb_addr.lo = U64_LO(mapping); 4096 4099 hc_sm_p = sb_data_e1x.common.state_machine; 4097 - hc_index_p = sb_data_e1x.index_data; 4098 4100 sb_data_p = (u32 *)&sb_data_e1x; 4099 4101 data_size = sizeof(struct hc_status_block_data_e1x)/sizeof(u32); 4100 4102 } ··· 8631 8635 static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp) 8632 8636 { 8633 8637 int /*abs*/func = BP_ABS_FUNC(bp); 8634 - int vn, port; 8638 + int vn; 8635 8639 u32 val = 0; 8636 8640 int rc = 0; 8637 8641 ··· 8666 8670 bp->mf_ov = 0; 8667 8671 bp->mf_mode = 0; 8668 8672 vn = BP_E1HVN(bp); 8669 - port = BP_PORT(bp); 8670 8673 8671 8674 if (!CHIP_IS_E1(bp) && !BP_NOMCP(bp)) { 8672 8675 DP(NETIF_MSG_PROBE,