[PATCH tip/core/rcu 65/88] rcu: move rcutiny.h to the new true/false-function style

From: Paul E. McKenney
Date: Thu May 25 2017 - 18:12:29 EST


This commit saves a few lines in include/linux/rcutiny.h by moving to
single-line definitions for functions that just return either true or
false, instead of the old style where the two curly braces each get
their own line. This commit also applies the same transformation to
rcu_all_qs(), which contains just barrier().

Reported-by: Ingo Molnar <mingo@xxxxxxxxxx>
Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
---
include/linux/rcutiny.h | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 5bca99f52673..2bfe48bc0e3b 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -33,10 +33,8 @@ static inline int rcu_dynticks_snap(struct rcu_dynticks *rdtp)
return 0;
}

-static inline bool rcu_eqs_special_set(int cpu)
-{
- return false; /* Never flag non-existent other CPUs! */
-}
+/* Never flag non-existent other CPUs! */
+static inline bool rcu_eqs_special_set(int cpu) { return false; }

static inline unsigned long get_state_synchronize_rcu(void)
{
@@ -120,15 +118,10 @@ void rcu_scheduler_starting(void);
static inline void rcu_scheduler_starting(void) { }
#endif /* #else #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SRCU) */

-static inline bool rcu_is_watching(void)
-{
- return true;
-}
+static inline bool rcu_is_watching(void) { return true; }

-static inline void rcu_all_qs(void)
-{
- barrier(); /* Avoid RCU read-side critical sections leaking across. */
-}
+/* Avoid RCU read-side critical sections leaking across. */
+static inline void rcu_all_qs(void) { barrier(); }

/* RCUtree hotplug events */
#define rcutree_prepare_cpu NULL
--
2.5.2