staging: rtl8712: remove wrapper function is_list_empty
is_list_empty is just an inline wrapper around list_empty. This patch removes the wrapper and directly uses list_empty instead. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
534c4acd1d
commit
9672b1bd83
|
@ -115,14 +115,6 @@ For the following list_xxx operations,
|
||||||
caller must guarantee the atomic context.
|
caller must guarantee the atomic context.
|
||||||
Otherwise, there will be racing condition.
|
Otherwise, there will be racing condition.
|
||||||
*/
|
*/
|
||||||
static inline u32 is_list_empty(struct list_head *phead)
|
|
||||||
{
|
|
||||||
if (list_empty(phead))
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void list_insert_tail(struct list_head *plist,
|
static inline void list_insert_tail(struct list_head *plist,
|
||||||
struct list_head *phead)
|
struct list_head *phead)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +131,7 @@ static inline u32 _down_sema(struct semaphore *sema)
|
||||||
|
|
||||||
static inline u32 _queue_empty(struct __queue *pqueue)
|
static inline u32 _queue_empty(struct __queue *pqueue)
|
||||||
{
|
{
|
||||||
return is_list_empty(&(pqueue->queue));
|
return list_empty(&(pqueue->queue));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline u32 end_of_queue_search(struct list_head *head,
|
static inline u32 end_of_queue_search(struct list_head *head,
|
||||||
|
|
|
@ -532,7 +532,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,
|
||||||
plist = get_next(phead);
|
plist = get_next(phead);
|
||||||
/* Handling some condition for forced indicate case.*/
|
/* Handling some condition for forced indicate case.*/
|
||||||
if (bforced == true) {
|
if (bforced == true) {
|
||||||
if (is_list_empty(phead))
|
if (list_empty(phead))
|
||||||
return true;
|
return true;
|
||||||
else {
|
else {
|
||||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||||
|
@ -542,7 +542,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,
|
||||||
}
|
}
|
||||||
/* Prepare indication list and indication.
|
/* Prepare indication list and indication.
|
||||||
* Check if there is any packet need indicate. */
|
* Check if there is any packet need indicate. */
|
||||||
while (!is_list_empty(phead)) {
|
while (!list_empty(phead)) {
|
||||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||||
pattrib = &prframe->u.hdr.attrib;
|
pattrib = &prframe->u.hdr.attrib;
|
||||||
if (!SN_LESS(preorder_ctrl->indicate_seq, pattrib->seq_num)) {
|
if (!SN_LESS(preorder_ctrl->indicate_seq, pattrib->seq_num)) {
|
||||||
|
|
|
@ -137,7 +137,7 @@ static struct cmd_obj *_dequeue_cmd(struct __queue *queue)
|
||||||
struct cmd_obj *obj;
|
struct cmd_obj *obj;
|
||||||
|
|
||||||
spin_lock_irqsave(&(queue->lock), irqL);
|
spin_lock_irqsave(&(queue->lock), irqL);
|
||||||
if (is_list_empty(&(queue->queue)))
|
if (list_empty(&(queue->queue)))
|
||||||
obj = NULL;
|
obj = NULL;
|
||||||
else {
|
else {
|
||||||
obj = LIST_CONTAINOR(get_next(&(queue->queue)),
|
obj = LIST_CONTAINOR(get_next(&(queue->queue)),
|
||||||
|
|
|
@ -939,7 +939,7 @@ sint r8712_xmit_classifier(struct _adapter *padapter,
|
||||||
ptxservq = get_sta_pending(padapter, &pstapending,
|
ptxservq = get_sta_pending(padapter, &pstapending,
|
||||||
psta, pattrib->priority);
|
psta, pattrib->priority);
|
||||||
spin_lock_irqsave(&pstapending->lock, irqL0);
|
spin_lock_irqsave(&pstapending->lock, irqL0);
|
||||||
if (is_list_empty(&ptxservq->tx_pending))
|
if (list_empty(&ptxservq->tx_pending))
|
||||||
list_insert_tail(&ptxservq->tx_pending,
|
list_insert_tail(&ptxservq->tx_pending,
|
||||||
get_list_head(pstapending));
|
get_list_head(pstapending));
|
||||||
list_insert_tail(&pxmitframe->list,
|
list_insert_tail(&pxmitframe->list,
|
||||||
|
|
Loading…
Reference in New Issue