Commit 29197b7c authored by James A Shackleford's avatar James A Shackleford Committed by Greg Kroah-Hartman

staging: rtl8712: remove wrapper function list_delete

list_delete is just an inline wrapper around list_del_init.  This patch
removes the wrapper and directly uses list_del_init.
Signed-off-by: default avatarJames A Shackleford <shack@linux.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fdfbf789
......@@ -71,11 +71,6 @@ static inline struct list_head *get_list_head(struct __queue *queue)
#define LIST_CONTAINOR(ptr, type, member) \
((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
static inline void list_delete(struct list_head *plist)
{
list_del_init(plist);
}
static inline void _init_timer(struct timer_list *ptimer,
struct net_device *padapter,
void *pfunc, void *cntx)
......
......@@ -145,7 +145,7 @@ int r8712_free_recvframe(union recv_frame *precvframe,
precvframe->u.hdr.pkt = NULL;
}
spin_lock_irqsave(&pfree_recv_queue->lock, irqL);
list_delete(&(precvframe->u.hdr.list));
list_del_init(&(precvframe->u.hdr.list));
list_add_tail(&(precvframe->u.hdr.list),
get_list_head(pfree_recv_queue));
if (padapter != NULL) {
......@@ -211,7 +211,7 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter,
phead = get_list_head(defrag_q);
plist = get_next(phead);
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
list_delete(&prframe->u.list);
list_del_init(&prframe->u.list);
pfhdr = &prframe->u.hdr;
curfragnum = 0;
if (curfragnum != pfhdr->attrib.frag_num) {
......@@ -511,7 +511,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
else
break;
}
list_delete(&(prframe->u.hdr.list));
list_del_init(&(prframe->u.hdr.list));
list_add_tail(&(prframe->u.hdr.list), plist);
return true;
}
......@@ -547,7 +547,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,
pattrib = &prframe->u.hdr.attrib;
if (!SN_LESS(preorder_ctrl->indicate_seq, pattrib->seq_num)) {
plist = get_next(plist);
list_delete(&(prframe->u.hdr.list));
list_del_init(&(prframe->u.hdr.list));
if (SN_EQUAL(preorder_ctrl->indicate_seq,
pattrib->seq_num))
preorder_ctrl->indicate_seq =
......
......@@ -171,7 +171,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv,
if ((end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
pxmitframe = LIST_CONTAINOR(xmitframe_plist,
struct xmit_frame, list);
list_delete(&pxmitframe->list);
list_del_init(&pxmitframe->list);
ptxservq->qcnt--;
phwxmit->txcmdcnt++;
}
......@@ -226,7 +226,7 @@ static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv,
/*Remove sta node when there are no pending packets.*/
if (_queue_empty(pframe_queue)) {
/*must be done after get_next and before break*/
list_delete(&ptxservq->tx_pending);
list_del_init(&ptxservq->tx_pending);
}
}
}
......
......@@ -142,7 +142,7 @@ static struct cmd_obj *_dequeue_cmd(struct __queue *queue)
else {
obj = LIST_CONTAINOR(get_next(&(queue->queue)),
struct cmd_obj, list);
list_delete(&obj->list);
list_del_init(&obj->list);
}
spin_unlock_irqrestore(&(queue->lock), irqL);
return obj;
......
......@@ -94,7 +94,7 @@ struct wlan_network *_r8712_alloc_network(struct mlme_priv *pmlmepriv)
spin_lock_irqsave(&free_queue->lock, irqL);
plist = get_next(&(free_queue->queue));
pnetwork = LIST_CONTAINOR(plist , struct wlan_network, list);
list_delete(&pnetwork->list);
list_del_init(&pnetwork->list);
pnetwork->last_scanned = jiffies;
pmlmepriv->num_of_scanned++;
spin_unlock_irqrestore(&free_queue->lock, irqL);
......@@ -117,7 +117,7 @@ static void _free_network(struct mlme_priv *pmlmepriv,
if (delta_time < SCANQUEUE_LIFETIME)
return;
spin_lock_irqsave(&free_queue->lock, irqL);
list_delete(&pnetwork->list);
list_del_init(&pnetwork->list);
list_add_tail(&pnetwork->list, &free_queue->queue);
pmlmepriv->num_of_scanned--;
spin_unlock_irqrestore(&free_queue->lock, irqL);
......@@ -132,7 +132,7 @@ static void _free_network_nolock(struct mlme_priv *pmlmepriv,
return;
if (pnetwork->fixed == true)
return;
list_delete(&pnetwork->list);
list_del_init(&pnetwork->list);
list_add_tail(&pnetwork->list, get_list_head(free_queue));
pmlmepriv->num_of_scanned--;
}
......
......@@ -118,7 +118,7 @@ union recv_frame *r8712_alloc_recvframe(struct __queue *pfree_recv_queue)
phead = get_list_head(pfree_recv_queue);
plist = get_next(phead);
precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
list_delete(&precvframe->u.hdr.list);
list_del_init(&precvframe->u.hdr.list);
padapter = precvframe->u.hdr.adapter;
if (padapter != NULL) {
precvpriv = &padapter->recvpriv;
......
......@@ -127,7 +127,7 @@ struct sta_info *r8712_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
else {
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue),
struct sta_info, list);
list_delete(&(psta->list));
list_del_init(&(psta->list));
tmp_aid = psta->aid;
_init_stainfo(psta);
memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
......@@ -181,21 +181,21 @@ void r8712_free_stainfo(struct _adapter *padapter, struct sta_info *psta)
pstaxmitpriv = &psta->sta_xmitpriv;
spin_lock_irqsave(&(pxmitpriv->vo_pending.lock), irqL0);
r8712_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vo_q.sta_pending);
list_delete(&(pstaxmitpriv->vo_q.tx_pending));
list_del_init(&(pstaxmitpriv->vo_q.tx_pending));
spin_unlock_irqrestore(&(pxmitpriv->vo_pending.lock), irqL0);
spin_lock_irqsave(&(pxmitpriv->vi_pending.lock), irqL0);
r8712_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vi_q.sta_pending);
list_delete(&(pstaxmitpriv->vi_q.tx_pending));
list_del_init(&(pstaxmitpriv->vi_q.tx_pending));
spin_unlock_irqrestore(&(pxmitpriv->vi_pending.lock), irqL0);
spin_lock_irqsave(&(pxmitpriv->bk_pending.lock), irqL0);
r8712_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->bk_q.sta_pending);
list_delete(&(pstaxmitpriv->bk_q.tx_pending));
list_del_init(&(pstaxmitpriv->bk_q.tx_pending));
spin_unlock_irqrestore(&(pxmitpriv->bk_pending.lock), irqL0);
spin_lock_irqsave(&(pxmitpriv->be_pending.lock), irqL0);
r8712_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->be_q.sta_pending);
list_delete(&(pstaxmitpriv->be_q.tx_pending));
list_del_init(&(pstaxmitpriv->be_q.tx_pending));
spin_unlock_irqrestore(&(pxmitpriv->be_pending.lock), irqL0);
list_delete(&psta->hash_list);
list_del_init(&psta->hash_list);
pstapriv->asoc_sta_count--;
/* re-init sta_info; 20061114 */
_r8712_init_sta_xmit_priv(&psta->sta_xmitpriv);
......
......@@ -750,7 +750,7 @@ struct xmit_buf *r8712_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
phead = get_list_head(pfree_xmitbuf_queue);
plist = get_next(phead);
pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
list_delete(&(pxmitbuf->list));
list_del_init(&(pxmitbuf->list));
}
if (pxmitbuf != NULL)
pxmitpriv->free_xmitbuf_cnt--;
......@@ -766,7 +766,7 @@ int r8712_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
if (pxmitbuf == NULL)
return _FAIL;
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irqL);
list_delete(&pxmitbuf->list);
list_del_init(&pxmitbuf->list);
list_add_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue));
pxmitpriv->free_xmitbuf_cnt++;
spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irqL);
......@@ -804,7 +804,7 @@ struct xmit_frame *r8712_alloc_xmitframe(struct xmit_priv *pxmitpriv)
phead = get_list_head(pfree_xmit_queue);
plist = get_next(phead);
pxframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
list_delete(&(pxframe->list));
list_del_init(&(pxframe->list));
}
if (pxframe != NULL) {
pxmitpriv->free_xmitframe_cnt--;
......@@ -828,7 +828,7 @@ void r8712_free_xmitframe(struct xmit_priv *pxmitpriv,
if (pxmitframe == NULL)
return;
spin_lock_irqsave(&pfree_xmit_queue->lock, irqL);
list_delete(&pxmitframe->list);
list_del_init(&pxmitframe->list);
if (pxmitframe->pkt) {
pndis_pkt = pxmitframe->pkt;
pxmitframe->pkt = NULL;
......
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