[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a550004dcdeb9e0b716f69033a541457c1f12c86.1674244819.git.philipp.g.hortmann@gmail.com>
Date: Fri, 20 Jan 2023 21:18:19 +0100
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH 4/6] staging: rtl8192e: Remove ant_pwr_diff which is always
zero
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@...il.com>
---
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
Powered by blists - more mailing lists