staging: r8723au: add & use local variable to simplify references
authorAlison Schofield <amsfield22@gmail.com>
Wed, 21 Oct 2015 06:09:37 +0000 (23:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 02:41:27 +0000 (19:41 -0700)
Add local variable scanned_queue to rtw_createbss_cmd23a_callback()
and use it (5x) to simplify references.

Addresses checkpatch.pl WARNING: line over 80 characters

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_cmd.c

index f8f637685986ffac9e1b30869a98bc4ab8658b61..3035bb864c39be184e505b267aa3cda1fbefc64c 100644 (file)
@@ -1343,6 +1343,7 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter,
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf;
        struct wlan_network *tgt_network = &pmlmepriv->cur_network;
+       struct rtw_queue *scanned_queue = &pmlmepriv->scanned_queue;
 
        if (pcmd->res != H2C_SUCCESS) {
                RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_,
@@ -1372,19 +1373,19 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter,
                spin_unlock_bh(&pmlmepriv->lock);
        } else {
                pwlan = rtw_alloc_network(pmlmepriv, GFP_KERNEL);
-               spin_lock_bh(&pmlmepriv->scanned_queue.lock);
+               spin_lock_bh(&scanned_queue->lock);
                if (!pwlan) {
-                       pwlan = rtw_get_oldest_wlan_network23a(&pmlmepriv->scanned_queue);
+                       pwlan = rtw_get_oldest_wlan_network23a(scanned_queue);
                        if (!pwlan) {
                                RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_,
                                         "Error:  can't get pwlan in rtw23a_joinbss_event_cb\n");
-                               spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
+                               spin_unlock_bh(&scanned_queue->lock);
                                goto createbss_cmd_fail;
                        }
                        pwlan->last_scanned = jiffies;
                } else {
                        list_add_tail(&pwlan->list,
-                                     &pmlmepriv->scanned_queue.queue);
+                                     &scanned_queue->queue);
                }
 
                pnetwork->Length = get_wlan_bssid_ex_sz(pnetwork);
@@ -1403,9 +1404,9 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter,
 
                clr_fwstate(pmlmepriv, _FW_UNDER_LINKING);
 
-               spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
                /*  we will set _FW_LINKED when there is one more sat to
                    join us (rtw_stassoc_event_callback23a) */
+               spin_unlock_bh(&scanned_queue->lock);
        }
 
 createbss_cmd_fail: