[PATCH 1/5] staging: rtl8192e: Remove unchanged variable AcmMethod
From: Philipp Hortmann
Date: Tue Nov 22 2022 - 17:46:09 EST
AcmMethod is initialized and never changed. The evaluation will always
have the same result. Remove resulting dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
drivers/staging/rtl8192e/rtl819x_Qos.h | 7 -------
4 files changed, 12 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index b9c846015d28..80eba5d5ab37 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -224,8 +224,6 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)
u8 acm = pAciAifsn->f.acm;
u8 AcmCtrl = rtl92e_readb(dev, AcmHwCtrl);
- AcmCtrl = AcmCtrl | ((priv->AcmMethod == 2) ? 0x0 : 0x1);
-
if (acm) {
switch (eACI) {
case AC0_BE:
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 399ee9783f99..a8cbeb9545da 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -830,7 +830,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev);
u8 i;
- priv->AcmMethod = eAcmWay2_SW;
priv->dot11_current_preamble_mode = PREAMBLE_AUTO;
priv->rtllib->status = 0;
priv->polling_timer_on = 0;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index b1656d4ecbad..54c7a2128053 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -340,8 +340,6 @@ struct r8192_priv {
struct bb_reg_definition PHYRegDef[4];
struct rate_adaptive rate_adaptive;
- enum acm_method AcmMethod;
-
struct rt_firmware *pFirmware;
enum rtl819x_loopback LoopbackMode;
diff --git a/drivers/staging/rtl8192e/rtl819x_Qos.h b/drivers/staging/rtl8192e/rtl819x_Qos.h
index 5073f9f40fdc..c010eb0d6036 100644
--- a/drivers/staging/rtl8192e/rtl819x_Qos.h
+++ b/drivers/staging/rtl8192e/rtl819x_Qos.h
@@ -97,13 +97,6 @@ enum direction_value {
DIR_BI_DIR = 3,
};
-enum acm_method {
- eAcmWay0_SwAndHw = 0,
- eAcmWay1_HW = 1,
- eAcmWay2_SW = 2,
-};
-
-
struct acm {
u64 UsedTime;
u64 MediumTime;
--
2.37.3