staging: rtl8723au: Eliminate _rtw_queue_empty23a()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 9 May 2014 13:03:59 +0000 (15:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:12:00 +0000 (13:12 -0700)
This was just a silly wrapper around list_empty()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ioctl_set.c
drivers/staging/rtl8723au/core/rtw_recv.c
drivers/staging/rtl8723au/core/rtw_xmit.c
drivers/staging/rtl8723au/include/osdep_service.h
drivers/staging/rtl8723au/os_dep/osdep_service.c

index b03266bc1f3c63803efc41a27e00800948c6984a..0024ff6f13e03772eea30075f3e5f2a889fc1025 100644 (file)
@@ -45,7 +45,7 @@ u8 rtw_do_join23a(struct rtw_adapter *padapter)
 
        pmlmepriv->to_join = true;
 
-       if (_rtw_queue_empty23a(queue) == true) {
+       if (list_empty(&queue->queue)) {
                spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
                _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
 
index 131b98c0582b0a712d3cffd1b6422f964ec4cf89..014bb54c1a13b45908f0cae46ea465baa6f7eea3 100644 (file)
@@ -110,7 +110,7 @@ struct recv_frame *rtw_alloc_recvframe23a(struct rtw_queue *pfree_recv_queue)
 
        spin_lock_bh(&pfree_recv_queue->lock);
 
-       if (_rtw_queue_empty23a(pfree_recv_queue) == true)
+       if (list_empty(&pfree_recv_queue->queue))
                pframe = NULL;
        else {
                phead = get_list_head(pfree_recv_queue);
@@ -255,7 +255,7 @@ struct recv_buf *rtw_dequeue_recvbuf23a (struct rtw_queue *queue)
 
        spin_lock_irqsave(&queue->lock, irqL);
 
-       if (_rtw_queue_empty23a(queue) == true) {
+       if (list_empty(&queue->queue)) {
                precvbuf = NULL;
        } else {
                phead = get_list_head(queue);
@@ -1756,7 +1756,7 @@ struct recv_frame* recvframe_chk_defrag23a(struct rtw_adapter *padapter,
                if (pdefrag_q != NULL) {
                        if (fragnum == 0) {
                                /* the first fragment */
-                               if (_rtw_queue_empty23a(pdefrag_q) == false) {
+                               if (!list_empty(&pdefrag_q->queue)) {
                                        /* free current defrag_q */
                                        rtw_free_recvframe23a_queue(pdefrag_q);
                                }
index 18007cf1340ed7441cc6a7a6888066249cbff34e..829283f58a3bb8022cc49bdb647e00c86cf034ce 100644 (file)
@@ -984,10 +984,10 @@ s32 rtw_txframes_pending23a(struct rtw_adapter *padapter)
 {
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
 
-       return (!_rtw_queue_empty23a(&pxmitpriv->be_pending)) ||
-              (!_rtw_queue_empty23a(&pxmitpriv->bk_pending)) ||
-              (!_rtw_queue_empty23a(&pxmitpriv->vi_pending)) ||
-              (!_rtw_queue_empty23a(&pxmitpriv->vo_pending));
+       return (!list_empty(&pxmitpriv->be_pending.queue)) ||
+               (!list_empty(&pxmitpriv->bk_pending.queue)) ||
+               (!list_empty(&pxmitpriv->vi_pending.queue)) ||
+               (!list_empty(&pxmitpriv->vo_pending.queue));
 }
 
 s32 rtw_txframes_sta_ac_pending23a(struct rtw_adapter *padapter,
@@ -1480,7 +1480,7 @@ static struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)
 
        spin_lock_bh(&pfree_xmit_queue->lock);
 
-       if (_rtw_queue_empty23a(pfree_xmit_queue) == true) {
+       if (list_empty(&pfree_xmit_queue->queue)) {
                RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_,
                         ("rtw_alloc_xmitframe:%d\n",
                          pxmitpriv->free_xmitframe_cnt));
@@ -1514,7 +1514,7 @@ struct xmit_frame *rtw_alloc_xmitframe23a_ext(struct xmit_priv *pxmitpriv)
 
        spin_lock_bh(&queue->lock);
 
-       if (_rtw_queue_empty23a(queue) == true) {
+       if (list_empty(&queue->queue)) {
                RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("rtw_alloc_xmitframe23a_ext:%d\n", pxmitpriv->free_xframe_ext_cnt));
                pxframe =  NULL;
        } else {
@@ -1673,7 +1673,9 @@ rtw_dequeue_xframe23a(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i,
                                phwxmit->accnt--;
 
                                /* Remove sta node when there is no pending packets. */
-                               if (_rtw_queue_empty23a(pframe_queue)) /* must be done after get_next and before break */
+                               /* must be done after get_next and
+                                  before break */
+                               if (list_empty(&pframe_queue->queue))
                                        list_del_init(&ptxservq->tx_pending);
                                goto exit;
                        }
index 3ec2469b3582411363f97179cbd81c2a58b2ed40..6992797044a8788fa4f17be0f1e78c2e2f54411d 100644 (file)
@@ -137,7 +137,6 @@ extern unsigned char        MCS_rate_2R23A[16];
 extern unsigned char   MCS_rate_1R23A[16];
 
 void   _rtw_init_queue23a(struct rtw_queue *pqueue);
-u32    _rtw_queue_empty23a(struct rtw_queue *pqueue);
 
 void rtw_suspend_lock_init(void);
 void rtw_suspend_lock_uninit(void);
index 68fa7a8fb7af111295ad58d8a350808ae3be923b..57c7bf8c314bdb73afae195a04c94d6b4c6018e1 100644 (file)
@@ -36,11 +36,3 @@ void _rtw_init_queue23a(struct rtw_queue *pqueue)
        INIT_LIST_HEAD(&pqueue->queue);
        spin_lock_init(&pqueue->lock);
 }
-
-u32 _rtw_queue_empty23a(struct rtw_queue *pqueue)
-{
-       if (list_empty(&pqueue->queue))
-               return true;
-       else
-               return false;
-}