staging: rtl8723bs: core: rtw_mlme: 'retry' is only used if REJOIN is set
authorLee Jones <lee.jones@linaro.org>
Wed, 14 Apr 2021 18:11:03 +0000 (19:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 May 2021 09:19:25 +0000 (11:19 +0200)
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_joinbss_event_prehandle’:
 drivers/staging/rtl8723bs/core/rtw_mlme.c:1192:12: warning: variable ‘retry’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Fabio Aiuto <fabioaiuto83@gmail.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-32-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme.c

index a16eabdeafd1e601efbc6cb265ea4dcc9f7286d9..b9bd1e8a3f073fcb79d08ece276144d5640a289d 100644 (file)
@@ -1189,7 +1189,7 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
 /* define REJOIN */
 void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
 {
-       static u8 retry;
+       static u8 __maybe_unused retry;
        struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL;
        struct  sta_priv *pstapriv = &adapter->stapriv;
        struct  mlme_priv *pmlmepriv = &(adapter->mlmepriv);