From: James A Shackleford <shack@linux.com>
To: gregkh@linuxfoundation.org, Larry.Finger@lwfinger.net,
florian.c.schilhabel@googlemail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Cc: James A Shackleford <shack@linux.com>
Subject: [PATCH 2/8] staging: rtl8712: remove wrapper function is_list_empty
Date: Tue, 24 Jun 2014 22:52:35 -0400 [thread overview]
Message-ID: <1403664761-15728-2-git-send-email-shack@linux.com> (raw)
In-Reply-To: <1403664761-15728-1-git-send-email-shack@linux.com>
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>
---
drivers/staging/rtl8712/osdep_service.h | 10 +---------
drivers/staging/rtl8712/rtl8712_recv.c | 4 ++--
drivers/staging/rtl8712/rtl871x_cmd.c | 2 +-
drivers/staging/rtl8712/rtl871x_xmit.c | 2 +-
4 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h
index 17c28c8..58f2090 100644
--- a/drivers/staging/rtl8712/osdep_service.h
+++ b/drivers/staging/rtl8712/osdep_service.h
@@ -115,14 +115,6 @@ For the following list_xxx operations,
caller must guarantee the atomic context.
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,
struct list_head *phead)
{
@@ -139,7 +131,7 @@ static inline u32 _down_sema(struct semaphore *sema)
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,
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
index f87a8fd..22840a1 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -532,7 +532,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,
plist = get_next(phead);
/* Handling some condition for forced indicate case.*/
if (bforced == true) {
- if (is_list_empty(phead))
+ if (list_empty(phead))
return true;
else {
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.
* 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);
pattrib = &prframe->u.hdr.attrib;
if (!SN_LESS(preorder_ctrl->indicate_seq, pattrib->seq_num)) {
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
index 646c5cd..689364d 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -137,7 +137,7 @@ static struct cmd_obj *_dequeue_cmd(struct __queue *queue)
struct cmd_obj *obj;
spin_lock_irqsave(&(queue->lock), irqL);
- if (is_list_empty(&(queue->queue)))
+ if (list_empty(&(queue->queue)))
obj = NULL;
else {
obj = LIST_CONTAINOR(get_next(&(queue->queue)),
diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c
index 68bfab0..989fb67 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -939,7 +939,7 @@ sint r8712_xmit_classifier(struct _adapter *padapter,
ptxservq = get_sta_pending(padapter, &pstapending,
psta, pattrib->priority);
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,
get_list_head(pstapending));
list_insert_tail(&pxmitframe->list,
--
1.7.9.5
next prev parent reply other threads:[~2014-06-25 2:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 2:52 [PATCH 1/8] staging: rtl8712: remove wrapper function _init_listhead James A Shackleford
2014-06-25 2:52 ` James A Shackleford [this message]
2014-06-25 2:52 ` [PATCH 3/8] staging: rtl8712: remove wrapper function list_insert_tail James A Shackleford
2014-06-25 2:52 ` [PATCH 4/8] staging: rtl8712: remove wrapper function list_delete James A Shackleford
2014-06-25 2:52 ` [PATCH 5/8] staging: rtl8712: remove wrapper function get_next James A Shackleford
2014-06-25 2:52 ` [PATCH 6/8] staging: rtl8712: remove function get_list_head James A Shackleford
2014-06-25 2:52 ` [PATCH 7/8] staging: rtl8712: remove wrapper function _queue_empty James A Shackleford
2014-06-25 2:52 ` [PATCH 8/8] staging: rtl8712: remove inapplicable comment James A Shackleford
2014-07-08 10:16 ` Dan Carpenter
2014-07-09 17:01 ` James A. Shackleford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403664761-15728-2-git-send-email-shack@linux.com \
--to=shack@linux.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=florian.c.schilhabel@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox