mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-26 14:23:39 +00:00
rtl8188eu: Fix some Sparse warnings
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
2393650ec6
commit
510176b3ad
13 changed files with 21 additions and 51 deletions
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <hal_data.h>
|
||||
|
||||
/* A mapping from HalData to ODM. */
|
||||
enum odm_board_type_e boardType(u8 InterfaceSel)
|
||||
static enum odm_board_type_e boardType(u8 InterfaceSel)
|
||||
{
|
||||
enum odm_board_type_e board = ODM_BOARD_DEFAULT;
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ void rtw_hal_power_off(_adapter *padapter)
|
|||
}
|
||||
|
||||
|
||||
void rtw_hal_init_opmode(_adapter *padapter)
|
||||
static void rtw_hal_init_opmode(_adapter *padapter)
|
||||
{
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE networkType = Ndis802_11InfrastructureMax;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
|
|
@ -1395,6 +1395,7 @@ void *scdb_findEntry(_adapter *priv, unsigned char *macAddr,
|
|||
void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb);
|
||||
int rtw_suspend_free_assoc_resource(_adapter *padapter);
|
||||
int recvbuf2recvframe(PADAPTER padapter, void *ptr);
|
||||
int rtw_change_ifname(_adapter *padapter, const char *ifname);
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
int rtw_suspend_wow(_adapter *padapter);
|
||||
|
|
|
@ -5788,7 +5788,6 @@ static int rtw_cta_test_start(struct net_device *dev,
|
|||
}
|
||||
|
||||
|
||||
extern int rtw_change_ifname(_adapter *padapter, const char *ifname);
|
||||
static int rtw_rereg_nd_name(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
|
|
|
@ -136,9 +136,9 @@ void _dynamic_check_timer_handler(struct timer_list *t)
|
|||
|
||||
#ifdef CONFIG_SET_SCAN_DENY_TIMER
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void _rtw_set_scan_deny_timer_hdl(void *FunctionContext)
|
||||
istatic void _rtw_set_scan_deny_timer_hdl(void *FunctionContext)
|
||||
#else
|
||||
void _rtw_set_scan_deny_timer_hdl(struct timer_list *t)
|
||||
static void _rtw_set_scan_deny_timer_hdl(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
|
@ -353,9 +353,9 @@ void rtw_report_sec_ie(_adapter *adapter, u8 authmode, u8 *sec_ie)
|
|||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void _survey_timer_hdl(void *FunctionContext)
|
||||
static void _survey_timer_hdl(void *FunctionContext)
|
||||
#else
|
||||
void _survey_timer_hdl(struct timer_list *t)
|
||||
static void _survey_timer_hdl(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
|
@ -368,9 +368,9 @@ void _survey_timer_hdl(struct timer_list *t)
|
|||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void _link_timer_hdl(void *FunctionContext)
|
||||
static void _link_timer_hdl(void *FunctionContext)
|
||||
#else
|
||||
void _link_timer_hdl(struct timer_list *t)
|
||||
static void _link_timer_hdl(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
|
@ -415,9 +415,9 @@ void _ft_roam_timer_hdl(struct timer_list *t);
|
|||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void _addba_timer_hdl(void *FunctionContext)
|
||||
static void _addba_timer_hdl(void *FunctionContext)
|
||||
#else
|
||||
void _addba_timer_hdl(struct timer_list *t)
|
||||
static void _addba_timer_hdl(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
|
|
|
@ -1084,7 +1084,7 @@ static int writeFile(struct file *fp, char *buf, int len)
|
|||
return -EPERM;
|
||||
|
||||
while (sum < len) {
|
||||
wlen = fp->f_op->write(fp, buf + sum, len - sum, &fp->f_pos);
|
||||
wlen = fp->f_op->write(fp, (char __user *)buf + sum, len - sum, &fp->f_pos);
|
||||
if (wlen > 0)
|
||||
sum += wlen;
|
||||
else if (0 != wlen)
|
||||
|
|
|
@ -666,7 +666,7 @@ void usb_write_port_cancel(struct intf_hdl *pintfhdl)
|
|||
}
|
||||
}
|
||||
|
||||
void usb_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf)
|
||||
static void usb_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf)
|
||||
{
|
||||
|
||||
precvbuf->transfer_len = 0;
|
||||
|
@ -858,7 +858,7 @@ void usb_recv_tasklet(void *priv)
|
|||
}
|
||||
}
|
||||
|
||||
void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||
static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||
{
|
||||
struct recv_buf *precvbuf = (struct recv_buf *)purb->context;
|
||||
_adapter *padapter = (_adapter *)precvbuf->adapter;
|
||||
|
|
|
@ -332,7 +332,7 @@ void rtw_os_wake_queue_at_free_stainfo(_adapter *padapter, int *qcnt_freed)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
||||
static int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
||||
{
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
|
Loading…
Reference in a new issue