staging: rtl8723bs: os_dep: ioctl_cfg80211: 'ack' is used when debug is enabled
authorLee Jones <lee.jones@linaro.org>
Wed, 14 Apr 2021 18:11:19 +0000 (19:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 May 2021 09:19:26 +0000 (11:19 +0200)
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function ‘_cfg80211_rtw_mgmt_tx’:
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2754:7: warning: variable ‘ack’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-48-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c

index c1dac6e..2d8d492 100644 (file)
@@ -2595,7 +2595,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b
        struct pkt_attrib       *pattrib;
        unsigned char *pframe;
        int ret = _FAIL;
-       bool ack = true;
+       bool __maybe_unused ack = true;
        struct ieee80211_hdr *pwlanhdr;
        struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
        struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);