staging: r8723au: Set undeclared routines to static
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 26 Apr 2014 16:55:17 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2014 17:16:16 +0000 (10:16 -0700)
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 <Larry.Finger@lwfinger.net>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_cmd.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_pwrctrl.c
drivers/staging/rtl8723au/core/rtw_recv.c
drivers/staging/rtl8723au/core/rtw_sta_mgt.c
drivers/staging/rtl8723au/core/rtw_wlan_util.c

index 8ce4148a3a49f013394b770448b1bc23df4ef094..c87671b60690e781cc7d37fd2a00cbb0b1348705 100644 (file)
@@ -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);
-}
index b205d0f2e8f4505a4e0630e826c5c5e2e73e579b..1f7f061ca1dd2f27a5168c68f9b45c01c119c871 100644 (file)
@@ -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;
index 303b76f9e1965230887b2113e9c2de86dcf1dfe7..40fcf36d54bd873485b2b3dff39e577e481c2f1d 100644 (file)
@@ -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;
index 77880547e80f4599db8c9eb83f7c2af3425b0826..7370a391ed96fbbf513681559a7788b59c1e81ea 100644 (file)
@@ -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;
index 644c3a132e59c56668627651235146e4c1b366cd..3791bbbdc58242c4a61ba15d6b16fa915f65f48b 100644 (file)
@@ -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;
index a64c350591c2fe596c510e75973e0533be47220f..53dd3207ecef707edf1f01d1910bf72cdeab3d9a 100644 (file)
@@ -21,7 +21,7 @@
 #include <mlme_osdep.h>
 #include <sta_info.h>
 
-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 */
 }
index a971c3d67a69dc183349f05a1ed35fbb8788b9c0..09f3a66010d991759ca9da6c9073fcd566ab64c9 100644 (file)
@@ -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);
 }