From: Larry Finger Date: Sat, 26 Apr 2014 16:55:17 +0000 (+0200) Subject: staging: r8723au: Set undeclared routines to static X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c0b99bed167c80281dc5aa757776ccddda8250f6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: r8723au: Set undeclared routines to static The following sparse warnings are fixed: drivers/staging/rtl8723au/core/rtw_cmd.c:1211:6: warning: symbol 'dynamic_chk_wk_hdl' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_cmd.c:1238:6: warning: symbol 'lps_ctrl_wk_hdl' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_cmd.c:1812:6: warning: symbol 'rtw_getrttbl_cmd_cmdrsp_callback' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_mlme.c:364:6: warning: symbol 'rtw_free_network' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_mlme.c:373:6: warning: symbol 'rtw_free_network_nolock' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_mlme.c:631:6: warning: symbol 'rtw_add_network' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_mlme.c:644:5: warning: symbol 'rtw_is_desired_network' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2246:5: warning: symbol 'DoReserved23a' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_mlme_ext.c:5549:6: warning: symbol 'linked23a_rx_sig_stren_disp' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_pwrctrl.c:272:4: warning: symbol 'PS_RDY_CHECK' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_recv.c:1937:5: warning: symbol 'enqueue_reorder_recvframe23a' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_sta_mgt.c:24:6: warning: symbol '_rtw_init_stainfo' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_sta_mgt.c:112:6: warning: symbol 'rtw_mfree_all_stainfo' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_sta_mgt.c:127:6: warning: symbol 'rtw_mfree_sta_priv_lock' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_wlan_util.c:143:15: warning: symbol 'ratetbl_val_2wifirate' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_wlan_util.c:188:5: warning: symbol 'is_basicrate' was not declared. Should it be static? drivers/staging/rtl8723au/core/rtw_wlan_util.c:206:14: warning: symbol 'ratetbl2rateset' was not declared. Should it be static? Three of the above routines were not used and were deleted. Signed-off-by: Larry Finger Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 8ce4148a3a49..c87671b60690 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -1083,7 +1083,7 @@ static void traffic_status_watchdog(struct rtw_adapter *padapter) pmlmepriv->LinkDetectInfo.bHigherBusyTxTraffic = bHigherBusyTxTraffic; } -void dynamic_chk_wk_hdl(struct rtw_adapter *padapter, u8 *pbuf, int sz) +static void dynamic_chk_wk_hdl(struct rtw_adapter *padapter, u8 *pbuf, int sz) { struct mlme_priv *pmlmepriv; @@ -1110,7 +1110,7 @@ void dynamic_chk_wk_hdl(struct rtw_adapter *padapter, u8 *pbuf, int sz) #endif } -void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) +static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -1689,9 +1689,3 @@ void rtw_setassocsta_cmdrsp_callback23a(struct rtw_adapter *padapter, exit: rtw_free_cmd_obj23a(pcmd); } - -void rtw_getrttbl_cmd_cmdrsp_callback(struct rtw_adapter *padapter, - struct cmd_obj *pcmd) -{ - rtw_free_cmd_obj23a(pcmd); -} diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c index b205d0f2e8f4..1f7f061ca1dd 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme.c @@ -361,17 +361,8 @@ int rtw_init_mlme_priv23a (struct rtw_adapter *padapter) return res; } -void rtw_free_network(struct mlme_priv *pmlmepriv, - struct wlan_network *pnetwork, u8 is_freeall) -{ - RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, - ("rtw_free_network ==> ssid = %s\n\n" , - pnetwork->network.Ssid.ssid)); - _rtw_free_network23a(pmlmepriv, pnetwork, is_freeall); -} - -void rtw_free_network_nolock(struct mlme_priv *pmlmepriv, - struct wlan_network *pnetwork) +static void rtw_free_network_nolock(struct mlme_priv *pmlmepriv, + struct wlan_network *pnetwork) { _rtw_free_network23a_nolock23a(pmlmepriv, pnetwork); } @@ -628,8 +619,8 @@ exit: spin_unlock_bh(&queue->lock); } -void rtw_add_network(struct rtw_adapter *adapter, - struct wlan_bssid_ex *pnetwork) +static void rtw_add_network(struct rtw_adapter *adapter, + struct wlan_bssid_ex *pnetwork) { update_current_network(adapter, pnetwork); rtw_update_scanned_network23a(adapter, pnetwork); @@ -641,8 +632,8 @@ void rtw_add_network(struct rtw_adapter *adapter, /* (3) WMM */ /* (4) HT */ /* (5) others */ -int rtw_is_desired_network(struct rtw_adapter *adapter, - struct wlan_network *pnetwork) +static int rtw_is_desired_network(struct rtw_adapter *adapter, + struct wlan_network *pnetwork) { struct security_priv *psecuritypriv = &adapter->securitypriv; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 303b76f9e196..40fcf36d54bd 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -2243,7 +2243,8 @@ OnAction23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) return _SUCCESS; } -int DoReserved23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) +static int DoReserved23a(struct rtw_adapter *padapter, + struct recv_frame *precv_frame) { return _SUCCESS; } @@ -5537,7 +5538,7 @@ void mlmeext_sta_del_event_callback23a(struct rtw_adapter *padapter) Following are the functions for the timer handlers *****************************************************************************/ -void linked23a_rx_sig_stren_disp(struct rtw_adapter *padapter) +static void linked23a_rx_sig_stren_disp(struct rtw_adapter *padapter) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index 77880547e80f..7370a391ed96 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -269,7 +269,7 @@ void rtw_set_rpwm23a(struct rtw_adapter *padapter, u8 pslv) } -u8 PS_RDY_CHECK(struct rtw_adapter * padapter) +static u8 PS_RDY_CHECK(struct rtw_adapter * padapter) { unsigned long delta_time; struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c index 644c3a132e59..3791bbbdc582 100644 --- a/drivers/staging/rtl8723au/core/rtw_recv.c +++ b/drivers/staging/rtl8723au/core/rtw_recv.c @@ -1934,8 +1934,8 @@ int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num) return true; } -int enqueue_reorder_recvframe23a(struct recv_reorder_ctrl *preorder_ctrl, - struct recv_frame *prframe) +static int enqueue_reorder_recvframe23a(struct recv_reorder_ctrl *preorder_ctrl, + struct recv_frame *prframe) { struct rx_pkt_attrib *pattrib = &prframe->attrib; struct rtw_queue *ppending_recvframe_queue; diff --git a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c index a64c350591c2..53dd3207ecef 100644 --- a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c @@ -21,7 +21,7 @@ #include #include -void _rtw_init_stainfo(struct sta_info *psta) +static void _rtw_init_stainfo(struct sta_info *psta) { memset((u8 *)psta, 0, sizeof (struct sta_info)); spin_lock_init(&psta->lock); @@ -109,7 +109,7 @@ inline struct sta_info *rtw_get_stainfo23a_by_offset23a(struct sta_priv *stapriv } /* this function is used to free the memory of lock || sema for all stainfos */ -void rtw_mfree_all_stainfo(struct sta_priv *pstapriv) +static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv) { struct list_head *plist, *phead; struct sta_info *psta; @@ -124,7 +124,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv) spin_unlock_bh(&pstapriv->sta_hash_lock); } -void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv) +static void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv) { rtw_mfree_all_stainfo(pstapriv); /* be done before free sta_hash_lock */ } diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c index a971c3d67a69..09f3a66010d9 100644 --- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c @@ -140,7 +140,7 @@ u8 judge_network_type23a(struct rtw_adapter *padapter, unsigned char *rate, int return network_type; } -unsigned char ratetbl_val_2wifirate(unsigned char rate) +static unsigned char ratetbl_val_2wifirate(unsigned char rate) { unsigned char val = 0; @@ -185,7 +185,7 @@ unsigned char ratetbl_val_2wifirate(unsigned char rate) return val; } -int is_basicrate(struct rtw_adapter *padapter, unsigned char rate) +static int is_basicrate(struct rtw_adapter *padapter, unsigned char rate) { int i; unsigned char val; @@ -203,7 +203,8 @@ int is_basicrate(struct rtw_adapter *padapter, unsigned char rate) return false; } -unsigned int ratetbl2rateset(struct rtw_adapter *padapter, unsigned char *rateset) +static unsigned int ratetbl2rateset(struct rtw_adapter *padapter, + unsigned char *rateset) { int i; unsigned char rate; @@ -1232,7 +1233,7 @@ unsigned int is_ap_in_wep23a(struct rtw_adapter *padapter) } } -int wifirate2_ratetbl_inx23a(unsigned char rate) +static int wifirate2_ratetbl_inx23a(unsigned char rate) { int inx = 0; rate = rate & 0x7f; @@ -1346,25 +1347,13 @@ unsigned char get_highest_rate_idx23a(u32 mask) return rate_idx; } -unsigned char get_highest_mcs_rate(struct HT_caps_element *pHT_caps) -{ - int i, mcs_rate; - - mcs_rate = (pHT_caps->u.HT_cap_element.MCS_rate[0] | (pHT_caps->u.HT_cap_element.MCS_rate[1] << 8)); - - for (i = 15; i >= 0; i--) { - if (mcs_rate & (0x1 << i)) - break; - } - return i; -} - void Update_RA_Entry23a(struct rtw_adapter *padapter, struct sta_info *psta) { rtw_hal_update_ra_mask23a(psta, 0); } -void enable_rate_adaptive(struct rtw_adapter *padapter, struct sta_info *psta) +static void enable_rate_adaptive(struct rtw_adapter *padapter, + struct sta_info *psta) { Update_RA_Entry23a(padapter, psta); }