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

b43: remove set but not used variables 'tx_pwr_state,tmp2'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/broadcom/b43/phy_n.c: In function 'b43_nphy_op_recalc_txpower':
drivers/net/wireless/broadcom/b43/phy_n.c:5898:7: warning:
variable 'tx_pwr_state' set but not used [-Wunused-but-set-variable]

drivers/net/wireless/broadcom/b43/phy_n.c:6047:20: warning:
variable 'tmp2' set but not used [-Wunused-but-set-variable]

'tx_pwr_state' never used since introduction in commit
8615eb2870f1 ("b43: N-PHY: support setting custom TX power")

'tmp2' not used any more since commit c002831a07dd ("b43: N-PHY: use helper
for checking IPA")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

YueHaibing and committed by
Kalle Valo
662a7b07 412dd15c

-4
-4
drivers/net/wireless/broadcom/b43/phy_n.c
··· 5895 5895 struct ieee80211_channel *channel = dev->wl->hw->conf.chandef.chan; 5896 5896 struct b43_ppr *ppr = &nphy->tx_pwr_max_ppr; 5897 5897 u8 max; /* qdBm */ 5898 - bool tx_pwr_state; 5899 5898 5900 5899 if (nphy->tx_pwr_last_recalc_freq == channel->center_freq && 5901 5900 nphy->tx_pwr_last_recalc_limit == phy->desired_txpower) ··· 5930 5931 b43_ppr_apply_min(dev, ppr, INT_TO_Q52(8)); 5931 5932 5932 5933 /* Apply */ 5933 - tx_pwr_state = nphy->txpwrctrl; 5934 5934 b43_mac_suspend(dev); 5935 5935 b43_nphy_tx_power_ctl_setup(dev); 5936 5936 if (dev->dev->core_rev == 11 || dev->dev->core_rev == 12) { ··· 6042 6044 u8 tx_pwr_state; 6043 6045 struct nphy_txgains target; 6044 6046 u16 tmp; 6045 - enum nl80211_band tmp2; 6046 6047 bool do_rssi_cal; 6047 6048 6048 6049 u16 clip[2]; ··· 6135 6138 b43_phy_write(dev, B43_NPHY_DUP40_BL, 0x9A4); 6136 6139 } 6137 6140 6138 - tmp2 = b43_current_band(dev->wl); 6139 6141 if (b43_nphy_ipa(dev)) { 6140 6142 b43_phy_set(dev, B43_NPHY_PAPD_EN0, 0x1); 6141 6143 b43_phy_maskset(dev, B43_NPHY_EPS_TABLE_ADJ0, 0x007F,