staging: rtl8188eu: Replace function rtw_alloc_network()
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Fri, 12 Jul 2019 07:17:43 +0000 (12:47 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jul 2019 05:34:15 +0000 (07:34 +0200)
Change external call site of _rtw_alloc_network to rtw_alloc_network.
Remove function rtw_alloc_network as all it does is call
_rtw_alloc_network.
Rename _rtw_alloc_network to rtw_alloc_network to maintain compatibility
with call sites. Keep its type as non-static (even though the old
rtw_alloc_network was static) as this functionality is used in other
files as well.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190712071746.2474-6-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/core/rtw_mlme.c
drivers/staging/rtl8188eu/include/rtw_mlme.h

index a24b40761af2e831e3291f43d3a7402e80037d24..815dfee11968f5c3446d2e8a11f07195537a3505 100644 (file)
@@ -1200,7 +1200,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
 
                rtw_indicate_connect(padapter);
        } else {
-               pwlan = _rtw_alloc_network(pmlmepriv);
+               pwlan = rtw_alloc_network(pmlmepriv);
                spin_lock_bh(&pmlmepriv->scanned_queue.lock);
                if (!pwlan) {
                        pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue);
index 43c7531e777ea619fd5d22cd1eb369e15af98635..1ec3b237212e6f846ced9886bc5a9ecab1f77316 100644 (file)
@@ -104,7 +104,7 @@ void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
        }
 }
 
-struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)
+struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
                                        /* _queue *free_queue) */
 {
        struct wlan_network *pnetwork;
@@ -119,7 +119,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)
        list_del_init(&pnetwork->list);
 
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
-                ("_rtw_alloc_network: ptr=%p\n", &pnetwork->list));
+                ("rtw_alloc_network: ptr=%p\n", &pnetwork->list));
        pnetwork->network_type = 0;
        pnetwork->fixed = false;
        pnetwork->last_scanned = jiffies;
@@ -272,11 +272,6 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
        return ie + 8;
 }
 
-static struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
-{
-       return _rtw_alloc_network(pmlmepriv);
-}
-
 int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork)
 {
        int ret = true;
index 9abb7c32019210f35db722dc57f5c70507e6780b..010f0c42368ac8842f7bb1c487572591e0057d3c 100644 (file)
@@ -333,7 +333,7 @@ void rtw_dynamic_check_timer_handlder(struct timer_list *t);
 
 void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
 
-struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
+struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 int rtw_if_up(struct adapter *padapter);