summaryrefslogtreecommitdiff
path: root/kernel/rcu/rcu_segcblist.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-05-02 18:18:40 +0300
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-05-02 18:18:40 +0300
commit8ef0f37efb7863a04b1e4102d42b7c0b1a59d40f (patch)
tree1ec092824b9fe6377174df097e61bd1603660646 /kernel/rcu/rcu_segcblist.h
parent98059b98619d093366462ff0a4e1258e946accb9 (diff)
downloadlinux-8ef0f37efb7863a04b1e4102d42b7c0b1a59d40f.tar.xz
rcu: Open-code the rcu_cblist_empty() function
Because the rcu_cblist_empty() just samples the ->head pointer, and because the rcu_cblist structure is quite straightforward, it makes sense to open-code rcu_cblist_empty(p) as !p->head, cutting out a level of indirection. This commit makes this change. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/rcu/rcu_segcblist.h')
-rw-r--r--kernel/rcu/rcu_segcblist.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/rcu/rcu_segcblist.h b/kernel/rcu/rcu_segcblist.h
index 86bc1101b806..7d18d41f0116 100644
--- a/kernel/rcu/rcu_segcblist.h
+++ b/kernel/rcu/rcu_segcblist.h
@@ -22,12 +22,6 @@
#include <linux/rcu_segcblist.h>
-/* Is simple callback list empty? */
-static inline bool rcu_cblist_empty(struct rcu_cblist *rclp)
-{
- return !rclp->head;
-}
-
/* Return number of callbacks in simple callback list. */
static inline long rcu_cblist_n_cbs(struct rcu_cblist *rclp)
{
@@ -66,7 +60,7 @@ static inline struct rcu_head *rcu_cblist_head(struct rcu_cblist *rclp)
*/
static inline struct rcu_head **rcu_cblist_tail(struct rcu_cblist *rclp)
{
- WARN_ON_ONCE(rcu_cblist_empty(rclp));
+ WARN_ON_ONCE(!rclp->head);
return rclp->tail;
}