提交 794ff053 编写于 作者: J Jes Sorensen 提交者: Greg Kroah-Hartman

staging: rtl8723au: Eliminate _rtw_queue_empty23a()

This was just a silly wrapper around list_empty()
Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c5779a0d
......@@ -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);
......
......@@ -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);
}
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册