rtl8188eu: Fix some Sparse warnings

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2019-04-21 11:36:57 -05:00
parent 2393650ec6
commit 510176b3ad
13 changed files with 21 additions and 51 deletions

View file

@ -119,7 +119,7 @@ exit:
return res;
}
void rtw_mfree_mlme_priv_lock(struct mlme_priv *pmlmepriv)
static void rtw_mfree_mlme_priv_lock(struct mlme_priv *pmlmepriv)
{
}

View file

@ -650,7 +650,7 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame)
return return_packet;
}
/* ###set the security information in the recv_frame */
union recv_frame *portctrl(_adapter *adapter, union recv_frame *precv_frame)
static union recv_frame *portctrl(_adapter *adapter, union recv_frame *precv_frame)
{
u8 *psta_addr = NULL;
u8 *ptr;
@ -2194,7 +2194,7 @@ exit:
/* remove the wlanhdr and add the eth_hdr */
sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
static sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
{
sint rmv_len;
u16 eth_type, len;
@ -2308,7 +2308,7 @@ exiting:
}
/* perform defrag */
union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
static union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
{
_list *plist, *phead;
u8 *data, wlanhdr_offset;

View file

@ -312,28 +312,13 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int
return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info));
}
void _rtw_free_sta_xmit_priv_lock(struct sta_xmit_priv *psta_xmitpriv)
{
}
static void _rtw_free_sta_recv_priv_lock(struct sta_recv_priv *psta_recvpriv)
{
}
void rtw_mfree_stainfo(struct sta_info *psta)
{
_rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv);
_rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv);
}
/* 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)
{
unsigned long irqL;
_list *plist, *phead;
struct sta_info *psta = NULL;
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
phead = get_list_head(&pstapriv->free_sta_queue);
@ -342,17 +327,12 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
while ((rtw_end_of_queue_search(phead, plist)) == false) {
psta = LIST_CONTAINOR(plist, struct sta_info , list);
plist = get_next(plist);
rtw_mfree_stainfo(psta);
}
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
}
void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv);
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 */
}

View file

@ -2890,10 +2890,6 @@ void update_wireless_mode(_adapter *padapter)
update_mgnt_tx_rate(padapter, IEEE80211_OFDM_RATE_6MB);
}
void fire_write_MAC_cmd(_adapter *padapter, unsigned int addr, unsigned int value)
{
}
void update_sta_basic_rate(struct sta_info *psta, u8 wireless_mode)
{
if (IsSupportedTxCCK(wireless_mode)) {

View file

@ -309,10 +309,6 @@ exit:
return res;
}
void rtw_mfree_xmit_priv_lock(struct xmit_priv *pxmitpriv)
{
}
void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
{
int i;
@ -322,8 +318,6 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
rtw_hal_free_xmit_priv(padapter);
rtw_mfree_xmit_priv_lock(pxmitpriv);
if (pxmitpriv->pxmit_frame_buf == NULL)
goto out;