Skip to content

Commit 584dc4c

Browse files
teobalutapaulmck
authored andcommitted
rcu: Remove "extern" from function declarations in include/linux/*rcu*.h
Function prototypes don't need to have the "extern" keyword since this is the default behavior. Its explicit use is redundant. This commit therefore removes them. Signed-off-by: Teodora Baluta <teobaluta@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 parent d100895 commit 584dc4c

File tree

4 files changed

+61
-61
lines changed

4 files changed

+61
-61
lines changed

include/linux/rculist.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ static inline void __list_add_rcu(struct list_head *new,
5555
next->prev = new;
5656
}
5757
#else
58-
extern void __list_add_rcu(struct list_head *new,
59-
struct list_head *prev, struct list_head *next);
58+
void __list_add_rcu(struct list_head *new,
59+
struct list_head *prev, struct list_head *next);
6060
#endif
6161

6262
/**

include/linux/rcupdate.h

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ extern int rcutorture_runnable; /* for sysctl */
5050
#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
5151

5252
#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
53-
extern void rcutorture_record_test_transition(void);
54-
extern void rcutorture_record_progress(unsigned long vernum);
55-
extern void do_trace_rcu_torture_read(const char *rcutorturename,
56-
struct rcu_head *rhp,
57-
unsigned long secs,
58-
unsigned long c_old,
59-
unsigned long c);
53+
void rcutorture_record_test_transition(void);
54+
void rcutorture_record_progress(unsigned long vernum);
55+
void do_trace_rcu_torture_read(const char *rcutorturename,
56+
struct rcu_head *rhp,
57+
unsigned long secs,
58+
unsigned long c_old,
59+
unsigned long c);
6060
#else
6161
static inline void rcutorture_record_test_transition(void)
6262
{
@@ -65,11 +65,11 @@ static inline void rcutorture_record_progress(unsigned long vernum)
6565
{
6666
}
6767
#ifdef CONFIG_RCU_TRACE
68-
extern void do_trace_rcu_torture_read(const char *rcutorturename,
69-
struct rcu_head *rhp,
70-
unsigned long secs,
71-
unsigned long c_old,
72-
unsigned long c);
68+
void do_trace_rcu_torture_read(const char *rcutorturename,
69+
struct rcu_head *rhp,
70+
unsigned long secs,
71+
unsigned long c_old,
72+
unsigned long c);
7373
#else
7474
#define do_trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \
7575
do { } while (0)
@@ -118,8 +118,8 @@ extern void do_trace_rcu_torture_read(const char *rcutorturename,
118118
* if CPU A and CPU B are the same CPU (but again only if the system has
119119
* more than one CPU).
120120
*/
121-
extern void call_rcu(struct rcu_head *head,
122-
void (*func)(struct rcu_head *head));
121+
void call_rcu(struct rcu_head *head,
122+
void (*func)(struct rcu_head *head));
123123

124124
#else /* #ifdef CONFIG_PREEMPT_RCU */
125125

@@ -149,8 +149,8 @@ extern void call_rcu(struct rcu_head *head,
149149
* See the description of call_rcu() for more detailed information on
150150
* memory ordering guarantees.
151151
*/
152-
extern void call_rcu_bh(struct rcu_head *head,
153-
void (*func)(struct rcu_head *head));
152+
void call_rcu_bh(struct rcu_head *head,
153+
void (*func)(struct rcu_head *head));
154154

155155
/**
156156
* call_rcu_sched() - Queue an RCU for invocation after sched grace period.
@@ -171,16 +171,16 @@ extern void call_rcu_bh(struct rcu_head *head,
171171
* See the description of call_rcu() for more detailed information on
172172
* memory ordering guarantees.
173173
*/
174-
extern void call_rcu_sched(struct rcu_head *head,
175-
void (*func)(struct rcu_head *rcu));
174+
void call_rcu_sched(struct rcu_head *head,
175+
void (*func)(struct rcu_head *rcu));
176176

177-
extern void synchronize_sched(void);
177+
void synchronize_sched(void);
178178

179179
#ifdef CONFIG_PREEMPT_RCU
180180

181-
extern void __rcu_read_lock(void);
182-
extern void __rcu_read_unlock(void);
183-
extern void rcu_read_unlock_special(struct task_struct *t);
181+
void __rcu_read_lock(void);
182+
void __rcu_read_unlock(void);
183+
void rcu_read_unlock_special(struct task_struct *t);
184184
void synchronize_rcu(void);
185185

186186
/*
@@ -216,19 +216,19 @@ static inline int rcu_preempt_depth(void)
216216
#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
217217

218218
/* Internal to kernel */
219-
extern void rcu_init(void);
220-
extern void rcu_sched_qs(int cpu);
221-
extern void rcu_bh_qs(int cpu);
222-
extern void rcu_check_callbacks(int cpu, int user);
219+
void rcu_init(void);
220+
void rcu_sched_qs(int cpu);
221+
void rcu_bh_qs(int cpu);
222+
void rcu_check_callbacks(int cpu, int user);
223223
struct notifier_block;
224-
extern void rcu_idle_enter(void);
225-
extern void rcu_idle_exit(void);
226-
extern void rcu_irq_enter(void);
227-
extern void rcu_irq_exit(void);
224+
void rcu_idle_enter(void);
225+
void rcu_idle_exit(void);
226+
void rcu_irq_enter(void);
227+
void rcu_irq_exit(void);
228228

229229
#ifdef CONFIG_RCU_USER_QS
230-
extern void rcu_user_enter(void);
231-
extern void rcu_user_exit(void);
230+
void rcu_user_enter(void);
231+
void rcu_user_exit(void);
232232
#else
233233
static inline void rcu_user_enter(void) { }
234234
static inline void rcu_user_exit(void) { }
@@ -262,7 +262,7 @@ static inline void rcu_user_hooks_switch(struct task_struct *prev,
262262
} while (0)
263263

264264
#if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP)
265-
extern bool __rcu_is_watching(void);
265+
bool __rcu_is_watching(void);
266266
#endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */
267267

268268
/*
@@ -289,8 +289,8 @@ void wait_rcu_gp(call_rcu_func_t crf);
289289
* initialization.
290290
*/
291291
#ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD
292-
extern void init_rcu_head_on_stack(struct rcu_head *head);
293-
extern void destroy_rcu_head_on_stack(struct rcu_head *head);
292+
void init_rcu_head_on_stack(struct rcu_head *head);
293+
void destroy_rcu_head_on_stack(struct rcu_head *head);
294294
#else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
295295
static inline void init_rcu_head_on_stack(struct rcu_head *head)
296296
{
@@ -363,7 +363,7 @@ static inline int rcu_read_lock_held(void)
363363
* rcu_read_lock_bh_held() is defined out of line to avoid #include-file
364364
* hell.
365365
*/
366-
extern int rcu_read_lock_bh_held(void);
366+
int rcu_read_lock_bh_held(void);
367367

368368
/**
369369
* rcu_read_lock_sched_held() - might we be in RCU-sched read-side critical section?
@@ -449,7 +449,7 @@ static inline int rcu_read_lock_sched_held(void)
449449

450450
#ifdef CONFIG_PROVE_RCU
451451

452-
extern int rcu_my_thread_group_empty(void);
452+
int rcu_my_thread_group_empty(void);
453453

454454
/**
455455
* rcu_lockdep_assert - emit lockdep splat if specified condition not met
@@ -1006,16 +1006,16 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
10061006
__kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head))
10071007

10081008
#ifdef CONFIG_RCU_NOCB_CPU
1009-
extern bool rcu_is_nocb_cpu(int cpu);
1009+
bool rcu_is_nocb_cpu(int cpu);
10101010
#else
10111011
static inline bool rcu_is_nocb_cpu(int cpu) { return false; }
10121012
#endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */
10131013

10141014

10151015
/* Only for use by adaptive-ticks code. */
10161016
#ifdef CONFIG_NO_HZ_FULL_SYSIDLE
1017-
extern bool rcu_sys_is_idle(void);
1018-
extern void rcu_sysidle_force_exit(void);
1017+
bool rcu_sys_is_idle(void);
1018+
void rcu_sysidle_force_exit(void);
10191019
#else /* #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */
10201020

10211021
static inline bool rcu_sys_is_idle(void)

include/linux/rcutiny.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static inline void exit_rcu(void)
125125

126126
#ifdef CONFIG_DEBUG_LOCK_ALLOC
127127
extern int rcu_scheduler_active __read_mostly;
128-
extern void rcu_scheduler_starting(void);
128+
void rcu_scheduler_starting(void);
129129
#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
130130
static inline void rcu_scheduler_starting(void)
131131
{

include/linux/rcutree.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
#ifndef __LINUX_RCUTREE_H
3131
#define __LINUX_RCUTREE_H
3232

33-
extern void rcu_note_context_switch(int cpu);
34-
extern int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies);
35-
extern void rcu_cpu_stall_reset(void);
33+
void rcu_note_context_switch(int cpu);
34+
int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies);
35+
void rcu_cpu_stall_reset(void);
3636

3737
/*
3838
* Note a virtualization-based context switch. This is simply a
@@ -44,9 +44,9 @@ static inline void rcu_virt_note_context_switch(int cpu)
4444
rcu_note_context_switch(cpu);
4545
}
4646

47-
extern void synchronize_rcu_bh(void);
48-
extern void synchronize_sched_expedited(void);
49-
extern void synchronize_rcu_expedited(void);
47+
void synchronize_rcu_bh(void);
48+
void synchronize_sched_expedited(void);
49+
void synchronize_rcu_expedited(void);
5050

5151
void kfree_call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu));
5252

@@ -71,25 +71,25 @@ static inline void synchronize_rcu_bh_expedited(void)
7171
synchronize_sched_expedited();
7272
}
7373

74-
extern void rcu_barrier(void);
75-
extern void rcu_barrier_bh(void);
76-
extern void rcu_barrier_sched(void);
74+
void rcu_barrier(void);
75+
void rcu_barrier_bh(void);
76+
void rcu_barrier_sched(void);
7777

7878
extern unsigned long rcutorture_testseq;
7979
extern unsigned long rcutorture_vernum;
80-
extern long rcu_batches_completed(void);
81-
extern long rcu_batches_completed_bh(void);
82-
extern long rcu_batches_completed_sched(void);
80+
long rcu_batches_completed(void);
81+
long rcu_batches_completed_bh(void);
82+
long rcu_batches_completed_sched(void);
8383

84-
extern void rcu_force_quiescent_state(void);
85-
extern void rcu_bh_force_quiescent_state(void);
86-
extern void rcu_sched_force_quiescent_state(void);
84+
void rcu_force_quiescent_state(void);
85+
void rcu_bh_force_quiescent_state(void);
86+
void rcu_sched_force_quiescent_state(void);
8787

88-
extern void exit_rcu(void);
88+
void exit_rcu(void);
8989

90-
extern void rcu_scheduler_starting(void);
90+
void rcu_scheduler_starting(void);
9191
extern int rcu_scheduler_active __read_mostly;
9292

93-
extern bool rcu_is_watching(void);
93+
bool rcu_is_watching(void);
9494

9595
#endif /* __LINUX_RCUTREE_H */

0 commit comments

Comments
 (0)