staging; rtl8723bs: Remove unnecessary function rtw_init_mlme_priv()
authorNishka Dasgupta <nishka.dasgupta@yahoo.com>
Fri, 22 Mar 2019 14:38:23 +0000 (20:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Mar 2019 08:50:02 +0000 (09:50 +0100)
Remove function rtw_init_mlme_priv() as all it does is call
_rtw_init_mlme_priv().
Change the name of _rtw_init_mlme_priv() to rtw_init_mlme_priv() and its
return type to int.
Remove references to _rtw_init_mlme_priv() from the corresponding header
file.
Suggestion to delete return variable from rtw_init_mlme_priv() put forward
by Coccinelle using ret.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/include/rtw_mlme.h

index 79adc6f1e53a19eb356a2b83846861522d333b0a..8f1defdd47f01feca99425cd9b5a47b6bc63312f 100644 (file)
 
 extern u8 rtw_do_join(struct adapter *padapter);
 
-sint   _rtw_init_mlme_priv(struct adapter *padapter)
+int    rtw_init_mlme_priv(struct adapter *padapter)
 {
        sint    i;
        u8 *pbuf;
        struct wlan_network     *pnetwork;
        struct mlme_priv        *pmlmepriv = &padapter->mlmepriv;
-       sint    res = _SUCCESS;
+       int     res = _SUCCESS;
 
        pmlmepriv->nic_hdl = (u8 *)padapter;
 
@@ -350,15 +350,6 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
        return (ie + 8);
 }
 
-
-int    rtw_init_mlme_priv(struct adapter *padapter)/* struct   mlme_priv *pmlmepriv) */
-{
-       int     res;
-
-       res = _rtw_init_mlme_priv(padapter);/*  (pmlmepriv); */
-       return res;
-}
-
 void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
 {
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_free_mlme_priv\n"));
index ed59f16c26c4d09048e2fe39e38d55546fd0181a..82f378c6789e31eff26329834fabeff93d662851 100644 (file)
@@ -592,8 +592,6 @@ void rtw_clear_scan_deny(struct adapter *adapter);
 void rtw_set_scan_deny_timer_hdl(struct adapter *adapter);
 void rtw_set_scan_deny(struct adapter *adapter, u32 ms);
 
-extern int _rtw_init_mlme_priv(struct adapter *padapter);
-
 void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
 
 extern void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);