From 794ff0530e43d9a6d96cf0ece451225dd77e7b1c Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Fri, 9 May 2014 15:03:59 +0200 Subject: [PATCH] staging: rtl8723au: Eliminate _rtw_queue_empty23a() This was just a silly wrapper around list_empty() Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_ioctl_set.c | 2 +- drivers/staging/rtl8723au/core/rtw_recv.c | 6 +++--- drivers/staging/rtl8723au/core/rtw_xmit.c | 16 +++++++++------- .../staging/rtl8723au/include/osdep_service.h | 1 - drivers/staging/rtl8723au/os_dep/osdep_service.c | 8 -------- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_ioctl_set.c b/drivers/staging/rtl8723au/core/rtw_ioctl_set.c index b03266bc1f3c..0024ff6f13e0 100644 --- a/drivers/staging/rtl8723au/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8723au/core/rtw_ioctl_set.c @@ -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); diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c index 131b98c0582b..014bb54c1a13 100644 --- a/drivers/staging/rtl8723au/core/rtw_recv.c +++ b/drivers/staging/rtl8723au/core/rtw_recv.c @@ -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); } diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c index 18007cf1340e..829283f58a3b 100644 --- a/drivers/staging/rtl8723au/core/rtw_xmit.c +++ b/drivers/staging/rtl8723au/core/rtw_xmit.c @@ -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; } diff --git a/drivers/staging/rtl8723au/include/osdep_service.h b/drivers/staging/rtl8723au/include/osdep_service.h index 3ec2469b3582..6992797044a8 100644 --- a/drivers/staging/rtl8723au/include/osdep_service.h +++ b/drivers/staging/rtl8723au/include/osdep_service.h @@ -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); diff --git a/drivers/staging/rtl8723au/os_dep/osdep_service.c b/drivers/staging/rtl8723au/os_dep/osdep_service.c index 68fa7a8fb7af..57c7bf8c314b 100644 --- a/drivers/staging/rtl8723au/os_dep/osdep_service.c +++ b/drivers/staging/rtl8723au/os_dep/osdep_service.c @@ -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; -} -- 2.20.1