From: Nishka Dasgupta Date: Fri, 22 Mar 2019 14:38:23 +0000 (+0530) Subject: staging; rtl8723bs: Remove unnecessary function rtw_init_mlme_priv() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cb8de77c78c73541edd32eeb62501af1bd73c76a;p=openwrt%2Fstaging%2Fblogic.git staging; rtl8723bs: Remove unnecessary function rtw_init_mlme_priv() 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index 79adc6f1e53a..8f1defdd47f0 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -13,13 +13,13 @@ 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")); diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme.h b/drivers/staging/rtl8723bs/include/rtw_mlme.h index ed59f16c26c4..82f378c6789e 100644 --- a/drivers/staging/rtl8723bs/include/rtw_mlme.h +++ b/drivers/staging/rtl8723bs/include/rtw_mlme.h @@ -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);