lkml.org 
[lkml]   [2017]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH tip/core/rcu 65/88] rcu: move rcutiny.h to the new true/false-function style
    Date
    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@kernel.org>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    ---
    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
    \
     
     \ /
      Last update: 2017-05-26 00:13    [W:4.589 / U:0.516 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site