[PATCH 4/6] staging: rtl8192e: Remove ant_pwr_diff which is always zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ant_pwr_diff is set to zero and then masked which will always result in
zero. Remove ant_pwr_diff and use zero direct as it is just useless
code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index 33e3435b50b2..c969c40c3979 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -586,7 +586,6 @@ void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 	u8	powerlevel = 0, powerlevelOFDM24G = 0;
-	s8	ant_pwr_diff;
 	u32	u4RegValue;
 
 	if (priv->epromtype == EEPROM_93C46) {
@@ -600,12 +599,8 @@ void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
 			powerlevel = 0;
 			powerlevelOFDM24G = 0;
 
-			ant_pwr_diff = 0;
-
-			ant_pwr_diff &= 0xf;
-
 			priv->antenna_tx_pwr_diff[2] = 0;
-			priv->antenna_tx_pwr_diff[1] = (u8)(ant_pwr_diff);
+			priv->antenna_tx_pwr_diff[1] = 0;
 			priv->antenna_tx_pwr_diff[0] = 0;
 
 			u4RegValue = priv->antenna_tx_pwr_diff[2] << 8 |
-- 
2.39.0





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux