[PATCH] staging: r8188eu: Remove set but unused variables

From: Fabio M. De Francesco
Date: Sun Aug 01 2021 - 21:01:13 EST


Remove set but unused variables. Issues detected by sparse.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
---
drivers/staging/r8188eu/core/rtw_mlme.c | 4 ----
drivers/staging/r8188eu/os_dep/osdep_service.c | 3 +--
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index d692f1477cc8..dfe7a3621efe 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -759,7 +759,6 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
{
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
- struct mlme_ext_priv *pmlmeext;
u8 timer_cancelled = 0;

spin_lock_bh(&pmlmepriv->lock);
@@ -854,9 +853,6 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
p2p_ps_wk_cmd(adapter, P2P_PS_SCAN_DONE, 0);

rtw_os_xmit_schedule(adapter);
-
- pmlmeext = &adapter->mlmeextpriv;
-
}

void rtw_dummy_event_callback(struct adapter *adapter, u8 *pbuf)
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index 99ddc535e5ea..f1257999e855 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -390,7 +390,7 @@ u64 rtw_division64(u64 x, u64 y)

void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
{
- u32 ori_len = 0, dup_len = 0;
+ u32 dup_len = 0;
u8 *ori = NULL;
u8 *dup = NULL;

@@ -409,7 +409,6 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)

keep_ori:
ori = *buf;
- ori_len = *buf_len;

/* replace buf with dup */
*buf_len = 0;
--
2.32.0