staging: rtl8723bs: core: rtw_sta_mgt: Remove unused variable 'psta'
authorLee Jones <lee.jones@linaro.org>
Wed, 14 Apr 2021 18:10:48 +0000 (19:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 May 2021 09:19:24 +0000 (11:19 +0200)
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c: In function ‘kfree_all_stainfo’:
 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:128:19: warning: variable ‘psta’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ross Schmidt <ross.schm.dev@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-17-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c

index 85663182b388a8293b315a1195f6add70d297f86..7b631a6b258a1fe281b1751e56c334cc0f5cd659 100644 (file)
@@ -119,7 +119,6 @@ void kfree_all_stainfo(struct sta_priv *pstapriv);
 void kfree_all_stainfo(struct sta_priv *pstapriv)
 {
        struct list_head        *plist, *phead;
-       struct sta_info *psta = NULL;
 
        spin_lock_bh(&pstapriv->sta_hash_lock);
 
@@ -127,7 +126,6 @@ void kfree_all_stainfo(struct sta_priv *pstapriv)
        plist = get_next(phead);
 
        while (phead != plist) {
-               psta = container_of(plist, struct sta_info, list);
                plist = get_next(plist);
        }