Skip to content

Commit d0df7a3

Browse files
committed
rcu: Move rcupdate.h to new empty-function style
This commit saves a few lines in include/linux/rcupdate.h by moving to single-line definitions for empty functions, instead of the old style where the two curly braces each get their own line. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 parent c4cbf9f commit d0df7a3

1 file changed

Lines changed: 9 additions & 30 deletions

File tree

‎include/linux/rcupdate.h‎

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,8 @@ static inline void rcu_end_inkernel_boot(void) { }
124124
void rcu_sysrq_start(void);
125125
void rcu_sysrq_end(void);
126126
#else /* #ifdef CONFIG_RCU_STALL_COMMON */
127-
static inline void rcu_sysrq_start(void)
128-
{
129-
}
130-
static inline void rcu_sysrq_end(void)
131-
{
132-
}
127+
static inline void rcu_sysrq_start(void) { }
128+
static inline void rcu_sysrq_end(void) { }
133129
#endif /* #else #ifdef CONFIG_RCU_STALL_COMMON */
134130

135131
#ifdef CONFIG_NO_HZ_FULL
@@ -143,9 +139,7 @@ static inline void rcu_user_exit(void) { }
143139
#ifdef CONFIG_RCU_NOCB_CPU
144140
void rcu_init_nohz(void);
145141
#else /* #ifdef CONFIG_RCU_NOCB_CPU */
146-
static inline void rcu_init_nohz(void)
147-
{
148-
}
142+
static inline void rcu_init_nohz(void) { }
149143
#endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */
150144

151145
/**
@@ -243,21 +237,10 @@ void destroy_rcu_head(struct rcu_head *head);
243237
void init_rcu_head_on_stack(struct rcu_head *head);
244238
void destroy_rcu_head_on_stack(struct rcu_head *head);
245239
#else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
246-
static inline void init_rcu_head(struct rcu_head *head)
247-
{
248-
}
249-
250-
static inline void destroy_rcu_head(struct rcu_head *head)
251-
{
252-
}
253-
254-
static inline void init_rcu_head_on_stack(struct rcu_head *head)
255-
{
256-
}
257-
258-
static inline void destroy_rcu_head_on_stack(struct rcu_head *head)
259-
{
260-
}
240+
static inline void init_rcu_head(struct rcu_head *head) { }
241+
static inline void destroy_rcu_head(struct rcu_head *head) { }
242+
static inline void init_rcu_head_on_stack(struct rcu_head *head) { }
243+
static inline void destroy_rcu_head_on_stack(struct rcu_head *head) { }
261244
#endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
262245

263246
#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU)
@@ -334,9 +317,7 @@ static inline void rcu_preempt_sleep_check(void)
334317
"Illegal context switch in RCU read-side critical section");
335318
}
336319
#else /* #ifdef CONFIG_PROVE_RCU */
337-
static inline void rcu_preempt_sleep_check(void)
338-
{
339-
}
320+
static inline void rcu_preempt_sleep_check(void) { }
340321
#endif /* #else #ifdef CONFIG_PROVE_RCU */
341322

342323
#define rcu_sleep_check() \
@@ -915,9 +896,7 @@ static inline bool rcu_sys_is_idle(void)
915896
return false;
916897
}
917898

918-
static inline void rcu_sysidle_force_exit(void)
919-
{
920-
}
899+
static inline void rcu_sysidle_force_exit(void) { }
921900

922901
#endif /* #else #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */
923902

0 commit comments

Comments
 (0)