Commit 16e53729 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: r8712u: Fix sparse warnings

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 921a86e0
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "drv_types.h" #include "drv_types.h"
#include "rtl871x_byteorder.h" #include "rtl871x_byteorder.h"
#include "farray.h" #include "farray.h"
#include "usb_osintf.h"
#define FWBUFF_ALIGN_SZ 512 #define FWBUFF_ALIGN_SZ 512
#define MAX_DUMP_FWSZ 49152 /*default = 49152 (48k)*/ #define MAX_DUMP_FWSZ 49152 /*default = 49152 (48k)*/
......
...@@ -139,20 +139,6 @@ int r8712_init_recvbuf(struct _adapter *padapter, struct recv_buf *precvbuf) ...@@ -139,20 +139,6 @@ int r8712_init_recvbuf(struct _adapter *padapter, struct recv_buf *precvbuf)
return res; return res;
} }
void init_recvframe(union recv_frame *precvframe, struct recv_priv *precvpriv)
{
struct recv_buf *precvbuf = precvframe->u.hdr.precvbuf;
/* Perry: This can be removed */
_init_listhead(&precvframe->u.hdr.list);
precvframe->u.hdr.len = 0;
if (precvbuf) {
if (precvbuf->pskb)
precvframe->u.hdr.pkt = skb_clone(precvbuf->pskb,
GFP_ATOMIC);
}
}
int r8712_free_recvframe(union recv_frame *precvframe, int r8712_free_recvframe(union recv_frame *precvframe,
struct __queue *pfree_recv_queue) struct __queue *pfree_recv_queue)
{ {
...@@ -217,7 +203,7 @@ static void update_recvframe_attrib_from_recvstat(struct rx_pkt_attrib *pattrib, ...@@ -217,7 +203,7 @@ static void update_recvframe_attrib_from_recvstat(struct rx_pkt_attrib *pattrib,
} }
/*perform defrag*/ /*perform defrag*/
union recv_frame *recvframe_defrag(struct _adapter *adapter, static union recv_frame *recvframe_defrag(struct _adapter *adapter,
struct __queue *defrag_q) struct __queue *defrag_q)
{ {
struct list_head *plist, *phead; struct list_head *plist, *phead;
...@@ -351,7 +337,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter, ...@@ -351,7 +337,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,
return prtnframe; return prtnframe;
} }
int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe) static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
{ {
int a_len, padding_len; int a_len, padding_len;
u16 eth_type, nSubframe_Length; u16 eth_type, nSubframe_Length;
......
...@@ -207,7 +207,7 @@ static u32 bitshift(u32 bitmask) ...@@ -207,7 +207,7 @@ static u32 bitshift(u32 bitmask)
return i; return i;
} }
u32 get_bb_reg(struct _adapter *pAdapter, u16 offset, u32 bitmask) static u32 get_bb_reg(struct _adapter *pAdapter, u16 offset, u32 bitmask)
{ {
u32 org_value, bit_shift, new_value; u32 org_value, bit_shift, new_value;
...@@ -217,7 +217,7 @@ u32 get_bb_reg(struct _adapter *pAdapter, u16 offset, u32 bitmask) ...@@ -217,7 +217,7 @@ u32 get_bb_reg(struct _adapter *pAdapter, u16 offset, u32 bitmask)
return new_value; return new_value;
} }
u8 set_bb_reg(struct _adapter *pAdapter, u16 offset, u32 bitmask, u32 value) static u8 set_bb_reg(struct _adapter *pAdapter, u16 offset, u32 bitmask, u32 value)
{ {
u32 org_value, bit_shift, new_value; u32 org_value, bit_shift, new_value;
......
...@@ -126,28 +126,6 @@ union recv_frame *r8712_alloc_recvframe(struct __queue *pfree_recv_queue) ...@@ -126,28 +126,6 @@ union recv_frame *r8712_alloc_recvframe(struct __queue *pfree_recv_queue)
return precvframe; return precvframe;
} }
union recv_frame *dequeue_recvframe(struct __queue *queue)
{
return r8712_alloc_recvframe(queue);
}
sint enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
{
unsigned long irqL;
struct _adapter *padapter = precvframe->u.hdr.adapter;
struct recv_priv *precvpriv = &padapter->recvpriv;
spin_lock_irqsave(&queue->lock, irqL);
list_delete(&(precvframe->u.hdr.list));
list_insert_tail(&(precvframe->u.hdr.list), get_list_head(queue));
if (padapter != NULL) {
if (queue == &precvpriv->free_recv_queue)
precvpriv->free_recvframe_cnt++;
}
spin_unlock_irqrestore(&queue->lock, irqL);
return _SUCCESS;
}
/* /*
caller : defrag; recvframe_chk_defrag in recv_thread (passive) caller : defrag; recvframe_chk_defrag in recv_thread (passive)
pframequeue: defrag_queue : will be accessed in recv_thread (passive) pframequeue: defrag_queue : will be accessed in recv_thread (passive)
...@@ -314,7 +292,7 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter, ...@@ -314,7 +292,7 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter,
return prtnframe; return prtnframe;
} }
sint recv_decache(union recv_frame *precv_frame, u8 bretry, static sint recv_decache(union recv_frame *precv_frame, u8 bretry,
struct stainfo_rxcache *prxcache) struct stainfo_rxcache *prxcache)
{ {
sint tid = precv_frame->u.hdr.attrib.priority; sint tid = precv_frame->u.hdr.attrib.priority;
...@@ -329,7 +307,7 @@ sint recv_decache(union recv_frame *precv_frame, u8 bretry, ...@@ -329,7 +307,7 @@ sint recv_decache(union recv_frame *precv_frame, u8 bretry,
return _SUCCESS; return _SUCCESS;
} }
sint sta2sta_data_frame(struct _adapter *adapter, union recv_frame *precv_frame, static sint sta2sta_data_frame(struct _adapter *adapter, union recv_frame *precv_frame,
struct sta_info **psta struct sta_info **psta
) )
{ {
...@@ -395,7 +373,7 @@ sint sta2sta_data_frame(struct _adapter *adapter, union recv_frame *precv_frame, ...@@ -395,7 +373,7 @@ sint sta2sta_data_frame(struct _adapter *adapter, union recv_frame *precv_frame,
return ret; return ret;
} }
sint ap2sta_data_frame(struct _adapter *adapter, union recv_frame *precv_frame, static sint ap2sta_data_frame(struct _adapter *adapter, union recv_frame *precv_frame,
struct sta_info **psta) struct sta_info **psta)
{ {
u8 *ptr = precv_frame->u.hdr.rx_data; u8 *ptr = precv_frame->u.hdr.rx_data;
...@@ -453,7 +431,7 @@ sint ap2sta_data_frame(struct _adapter *adapter, union recv_frame *precv_frame, ...@@ -453,7 +431,7 @@ sint ap2sta_data_frame(struct _adapter *adapter, union recv_frame *precv_frame,
return _SUCCESS; return _SUCCESS;
} }
sint sta2ap_data_frame(struct _adapter *adapter, union recv_frame *precv_frame, static sint sta2ap_data_frame(struct _adapter *adapter, union recv_frame *precv_frame,
struct sta_info **psta) struct sta_info **psta)
{ {
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
...@@ -474,20 +452,20 @@ sint sta2ap_data_frame(struct _adapter *adapter, union recv_frame *precv_frame, ...@@ -474,20 +452,20 @@ sint sta2ap_data_frame(struct _adapter *adapter, union recv_frame *precv_frame,
return _SUCCESS; return _SUCCESS;
} }
sint validate_recv_ctrl_frame(struct _adapter *adapter, static sint validate_recv_ctrl_frame(struct _adapter *adapter,
union recv_frame *precv_frame) union recv_frame *precv_frame)
{ {
return _FAIL; return _FAIL;
} }
sint validate_recv_mgnt_frame(struct _adapter *adapter, static sint validate_recv_mgnt_frame(struct _adapter *adapter,
union recv_frame *precv_frame) union recv_frame *precv_frame)
{ {
return _FAIL; return _FAIL;
} }
sint validate_recv_data_frame(struct _adapter *adapter, static sint validate_recv_data_frame(struct _adapter *adapter,
union recv_frame *precv_frame) union recv_frame *precv_frame)
{ {
int res; int res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment