summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>2023-01-21 22:44:53 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-23 19:04:49 +0100
commit5440dade683e47c9b4478f2793c4df4bfe654732 (patch)
tree9797bee8d1b95b57a8961d2d90d765c1c3096302
parent0d9943b8b21c7927711e4108db65f9e38400e6f0 (diff)
downloadlinux-5440dade683e47c9b4478f2793c4df4bfe654732.tar.gz
linux-5440dade683e47c9b4478f2793c4df4bfe654732.zip
staging: rtl8192e: Remove unused variable bfirst_init
bfirst_init is six times set but never evaluated. Remove dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/d4f4552e5dbaa036a762590bf47bd5faff15b598.1674336211.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_core.c6
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_core.h1
2 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 7a89381bae50..80450d46191c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -692,16 +692,13 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset)
priv->rtllib->ieee_up = 1;
priv->up_first_time = 0;
- priv->bfirst_init = true;
init_status = priv->ops->initialize_adapter(dev);
if (!init_status) {
netdev_err(dev, "%s(): Initialization failed!\n", __func__);
- priv->bfirst_init = false;
return -1;
}
RT_CLEAR_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC);
- priv->bfirst_init = false;
if (priv->polling_timer_on == 0)
rtl92e_check_rfctrl_gpio_timer(&priv->gpio_polling_timer);
@@ -837,7 +834,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->blinked_ingpio = false;
priv->being_init_adapter = false;
priv->bdisable_nic = false;
- priv->bfirst_init = false;
priv->txringcount = 64;
priv->rxbuffersize = 9100;
priv->rxringcount = MAX_RX_COUNT;
@@ -2423,7 +2419,6 @@ bool rtl92e_enable_nic(struct net_device *dev)
return false;
}
- priv->bfirst_init = true;
init_status = priv->ops->initialize_adapter(dev);
if (!init_status) {
netdev_warn(dev, "%s(): Initialization failed!\n", __func__);
@@ -2431,7 +2426,6 @@ bool rtl92e_enable_nic(struct net_device *dev)
return false;
}
RT_CLEAR_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC);
- priv->bfirst_init = false;
rtl92e_irq_enable(dev);
priv->bdisable_nic = false;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 59049ad349e0..e0f4a3b444ee 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -298,7 +298,6 @@ struct r8192_priv {
struct pci_dev *pdev;
struct pci_dev *bridge_pdev;
- bool bfirst_init;
bool bfirst_after_down;
bool being_init_adapter;