aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2009-09-23 12:50:43 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-23 13:46:30 -0400
commit9b2619aff0332e95ea5eb7a0d75b0208818d871c (patch)
treea1aed182c4f1ec511352c0e3cb3eba0e20535263 /kernel
parent1eba8f84380bede3c602bd7758dea96925cead01 (diff)
rcu: Clean up code to address Ingo's checkpatch feedback
Move declarations and update storage classes to make checkpatch happy. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com Cc: akpm@linux-foundation.org Cc: mathieu.desnoyers@polymtl.ca Cc: josh@joshtriplett.org Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org Cc: Valdis.Kletnieks@vt.edu Cc: dhowells@redhat.com LKML-Reference: <12537246441701-git-send-email-> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcupdate.c3
-rw-r--r--kernel/rcutorture.c4
-rw-r--r--kernel/rcutree.c23
-rw-r--r--kernel/rcutree.h26
-rw-r--r--kernel/rcutree_trace.c12
5 files changed, 32 insertions, 36 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 37ac45483082..8e795133b33d 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -259,9 +259,6 @@ static void rcu_migrate_callback(struct rcu_head *notused)
259 wake_up(&rcu_migrate_wq); 259 wake_up(&rcu_migrate_wq);
260} 260}
261 261
262extern int rcu_cpu_notify(struct notifier_block *self,
263 unsigned long action, void *hcpu);
264
265static int __cpuinit rcu_barrier_cpu_hotplug(struct notifier_block *self, 262static int __cpuinit rcu_barrier_cpu_hotplug(struct notifier_block *self,
266 unsigned long action, void *hcpu) 263 unsigned long action, void *hcpu)
267{ 264{
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 233768f21f97..697c0a0229d4 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -606,8 +606,6 @@ static struct rcu_torture_ops sched_ops_sync = {
606 .name = "sched_sync" 606 .name = "sched_sync"
607}; 607};
608 608
609extern int rcu_expedited_torture_stats(char *page);
610
611static struct rcu_torture_ops sched_expedited_ops = { 609static struct rcu_torture_ops sched_expedited_ops = {
612 .init = rcu_sync_torture_init, 610 .init = rcu_sync_torture_init,
613 .cleanup = NULL, 611 .cleanup = NULL,
@@ -650,7 +648,7 @@ rcu_torture_writer(void *arg)
650 old_rp = rcu_torture_current; 648 old_rp = rcu_torture_current;
651 rp->rtort_mbtest = 1; 649 rp->rtort_mbtest = 1;
652 rcu_assign_pointer(rcu_torture_current, rp); 650 rcu_assign_pointer(rcu_torture_current, rp);
653 smp_wmb(); 651 smp_wmb(); /* Mods to old_rp must follow rcu_assign_pointer() */
654 if (old_rp) { 652 if (old_rp) {
655 i = old_rp->rtort_pipe_count; 653 i = old_rp->rtort_pipe_count;
656 if (i > RCU_TORTURE_PIPE_LEN) 654 if (i > RCU_TORTURE_PIPE_LEN)
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 53a5ef0ca911..8e52cde7b8f7 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -81,29 +81,6 @@ DEFINE_PER_CPU(struct rcu_data, rcu_sched_data);
81struct rcu_state rcu_bh_state = RCU_STATE_INITIALIZER(rcu_bh_state); 81struct rcu_state rcu_bh_state = RCU_STATE_INITIALIZER(rcu_bh_state);
82DEFINE_PER_CPU(struct rcu_data, rcu_bh_data); 82DEFINE_PER_CPU(struct rcu_data, rcu_bh_data);
83 83
84/* Forward declarations for rcutree_plugin.h */
85static inline void rcu_bootup_announce(void);
86long rcu_batches_completed(void);
87static void rcu_preempt_note_context_switch(int cpu);
88static int rcu_preempted_readers(struct rcu_node *rnp);
89#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
90static void rcu_print_task_stall(struct rcu_node *rnp);
91#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
92static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp);
93#ifdef CONFIG_HOTPLUG_CPU
94static void rcu_preempt_offline_tasks(struct rcu_state *rsp,
95 struct rcu_node *rnp,
96 struct rcu_data *rdp);
97static void rcu_preempt_offline_cpu(int cpu);
98#endif /* #ifdef CONFIG_HOTPLUG_CPU */
99static void rcu_preempt_check_callbacks(int cpu);
100static void rcu_preempt_process_callbacks(void);
101void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu));
102static int rcu_preempt_pending(int cpu);
103static int rcu_preempt_needs_cpu(int cpu);
104static void __cpuinit rcu_preempt_init_percpu_data(int cpu);
105static void __init __rcu_init_preempt(void);
106
107 84
108/* 85/*
109 * Return true if an RCU grace period is in progress. The ACCESS_ONCE()s 86 * Return true if an RCU grace period is in progress. The ACCESS_ONCE()s
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index a48d11f37b4c..e6ab31cc28ba 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -270,5 +270,29 @@ extern struct rcu_state rcu_preempt_state;
270DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data); 270DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);
271#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ 271#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
272 272
273#endif /* #ifdef RCU_TREE_NONCORE */ 273#else /* #ifdef RCU_TREE_NONCORE */
274 274
275/* Forward declarations for rcutree_plugin.h */
276static inline void rcu_bootup_announce(void);
277long rcu_batches_completed(void);
278static void rcu_preempt_note_context_switch(int cpu);
279static int rcu_preempted_readers(struct rcu_node *rnp);
280#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
281static void rcu_print_task_stall(struct rcu_node *rnp);
282#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
283static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp);
284#ifdef CONFIG_HOTPLUG_CPU
285static void rcu_preempt_offline_tasks(struct rcu_state *rsp,
286 struct rcu_node *rnp,
287 struct rcu_data *rdp);
288static void rcu_preempt_offline_cpu(int cpu);
289#endif /* #ifdef CONFIG_HOTPLUG_CPU */
290static void rcu_preempt_check_callbacks(int cpu);
291static void rcu_preempt_process_callbacks(void);
292void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu));
293static int rcu_preempt_pending(int cpu);
294static int rcu_preempt_needs_cpu(int cpu);
295static void __cpuinit rcu_preempt_init_percpu_data(int cpu);
296static void __init __rcu_init_preempt(void);
297
298#endif /* #else #ifdef RCU_TREE_NONCORE */
diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
index c89f5e9fd173..f09af28b8262 100644
--- a/kernel/rcutree_trace.c
+++ b/kernel/rcutree_trace.c
@@ -93,7 +93,7 @@ static int rcudata_open(struct inode *inode, struct file *file)
93 return single_open(file, show_rcudata, NULL); 93 return single_open(file, show_rcudata, NULL);
94} 94}
95 95
96static struct file_operations rcudata_fops = { 96static const struct file_operations rcudata_fops = {
97 .owner = THIS_MODULE, 97 .owner = THIS_MODULE,
98 .open = rcudata_open, 98 .open = rcudata_open,
99 .read = seq_read, 99 .read = seq_read,
@@ -145,7 +145,7 @@ static int rcudata_csv_open(struct inode *inode, struct file *file)
145 return single_open(file, show_rcudata_csv, NULL); 145 return single_open(file, show_rcudata_csv, NULL);
146} 146}
147 147
148static struct file_operations rcudata_csv_fops = { 148static const struct file_operations rcudata_csv_fops = {
149 .owner = THIS_MODULE, 149 .owner = THIS_MODULE,
150 .open = rcudata_csv_open, 150 .open = rcudata_csv_open,
151 .read = seq_read, 151 .read = seq_read,
@@ -159,7 +159,7 @@ static void print_one_rcu_state(struct seq_file *m, struct rcu_state *rsp)
159 struct rcu_node *rnp; 159 struct rcu_node *rnp;
160 160
161 seq_printf(m, "c=%ld g=%ld s=%d jfq=%ld j=%x " 161 seq_printf(m, "c=%ld g=%ld s=%d jfq=%ld j=%x "
162 "nfqs=%lu/nfqsng=%lu(%lu) fqlh=%lu\n", 162 "nfqs=%lu/nfqsng=%lu(%lu) fqlh=%lu\n",
163 rsp->completed, rsp->gpnum, rsp->signaled, 163 rsp->completed, rsp->gpnum, rsp->signaled,
164 (long)(rsp->jiffies_force_qs - jiffies), 164 (long)(rsp->jiffies_force_qs - jiffies),
165 (int)(jiffies & 0xffff), 165 (int)(jiffies & 0xffff),
@@ -196,7 +196,7 @@ static int rcuhier_open(struct inode *inode, struct file *file)
196 return single_open(file, show_rcuhier, NULL); 196 return single_open(file, show_rcuhier, NULL);
197} 197}
198 198
199static struct file_operations rcuhier_fops = { 199static const struct file_operations rcuhier_fops = {
200 .owner = THIS_MODULE, 200 .owner = THIS_MODULE,
201 .open = rcuhier_open, 201 .open = rcuhier_open,
202 .read = seq_read, 202 .read = seq_read,
@@ -222,7 +222,7 @@ static int rcugp_open(struct inode *inode, struct file *file)
222 return single_open(file, show_rcugp, NULL); 222 return single_open(file, show_rcugp, NULL);
223} 223}
224 224
225static struct file_operations rcugp_fops = { 225static const struct file_operations rcugp_fops = {
226 .owner = THIS_MODULE, 226 .owner = THIS_MODULE,
227 .open = rcugp_open, 227 .open = rcugp_open,
228 .read = seq_read, 228 .read = seq_read,
@@ -276,7 +276,7 @@ static int rcu_pending_open(struct inode *inode, struct file *file)
276 return single_open(file, show_rcu_pending, NULL); 276 return single_open(file, show_rcu_pending, NULL);
277} 277}
278 278
279static struct file_operations rcu_pending_fops = { 279static const struct file_operations rcu_pending_fops = {
280 .owner = THIS_MODULE, 280 .owner = THIS_MODULE,
281 .open = rcu_pending_open, 281 .open = rcu_pending_open,
282 .read = seq_read, 282 .read = seq_read,