OSDN Git Service

staging: rtl8192e: Remove unchanged variable bDisableNormalResetCheck
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sat, 1 Oct 2022 09:41:18 +0000 (11:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Oct 2022 15:19:26 +0000 (17:19 +0200)
bDisableNormalResetCheck is just once initialized with false. All
evaluations will result in !false. Remove resulting dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/026313f17cf708bf8fa0661f83b2c2b515e55b12.1664616227.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.h

index e77a73d..9dcae5d 100644 (file)
@@ -871,7 +871,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
        priv->ScanDelay = 50;
        priv->ResetProgress = RESET_TYPE_NORESET;
        priv->bForcedSilentReset = false;
-       priv->bDisableNormalResetCheck = false;
        priv->force_reset = false;
        memset(priv->rtllib->swcamtable, 0, sizeof(struct sw_cam_table) * 32);
 
@@ -1403,13 +1402,12 @@ static void _rtl92e_watchdog_wq_cb(void *data)
        }
        spin_unlock_irqrestore(&priv->tx_lock, flags);
 
-       if (!priv->bDisableNormalResetCheck && ResetType == RESET_TYPE_NORMAL) {
+       if (ResetType == RESET_TYPE_NORMAL) {
                priv->ResetProgress = RESET_TYPE_NORMAL;
                return;
        }
 
-       if (((priv->force_reset) || (!priv->bDisableNormalResetCheck &&
-             ResetType == RESET_TYPE_SILENT)))
+       if ((priv->force_reset || ResetType == RESET_TYPE_SILENT))
                _rtl92e_if_silent_reset(dev);
        priv->force_reset = false;
        priv->bForcedSilentReset = false;
index 7d716fa..8a24037 100644 (file)
@@ -541,7 +541,6 @@ struct r8192_priv {
 
        enum reset_type ResetProgress;
        bool            bForcedSilentReset;
-       bool            bDisableNormalResetCheck;
        u16             TxCounter;
        u16             RxCounter;
        bool            bResetInProgress;