diff options
author | James A Shackleford <shack@linux.com> | 2014-06-24 22:52:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:33:15 -0400 |
commit | 29197b7c45a144883d87cb8eaf337026cd886a20 (patch) | |
tree | 75b56af37bdb02cd11d98ad17197c3185044e019 /drivers/staging/rtl8712 | |
parent | fdfbf7890dcac98d698ce889720e90c1f26cf30f (diff) |
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: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712')
-rw-r--r-- | drivers/staging/rtl8712/osdep_service.h | 5 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_recv.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_xmit.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_cmd.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_mlme.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_recv.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_sta_mgt.c | 12 | ||||
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_xmit.c | 8 |
8 files changed, 21 insertions, 26 deletions
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h index a0c02708f64a..99b7006843ba 100644 --- a/drivers/staging/rtl8712/osdep_service.h +++ b/drivers/staging/rtl8712/osdep_service.h @@ -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) diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index bdd208d68075..985b8615876b 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.c +++ b/drivers/staging/rtl8712/rtl8712_recv.c @@ -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 = diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c index 4e3f09420c1e..56aa209cf960 100644 --- a/drivers/staging/rtl8712/rtl8712_xmit.c +++ b/drivers/staging/rtl8712/rtl8712_xmit.c @@ -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); } } } diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index cae8ee675d58..338bb141c94f 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -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; diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index 05ff7dd5a3de..943d25add521 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -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--; } diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c index cd319823542e..246b8ce513d7 100644 --- a/drivers/staging/rtl8712/rtl871x_recv.c +++ b/drivers/staging/rtl8712/rtl871x_recv.c @@ -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; diff --git a/drivers/staging/rtl8712/rtl871x_sta_mgt.c b/drivers/staging/rtl8712/rtl871x_sta_mgt.c index e7f3cdb0533a..92d53278b563 100644 --- a/drivers/staging/rtl8712/rtl871x_sta_mgt.c +++ b/drivers/staging/rtl8712/rtl871x_sta_mgt.c @@ -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); diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c index 71d0d0d597e9..2e79e4ef18ab 100644 --- a/drivers/staging/rtl8712/rtl871x_xmit.c +++ b/drivers/staging/rtl8712/rtl871x_xmit.c @@ -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; |