Skip to contentSkip to conversation

sysctl extern cleanup - rcu

PATCH In review Dave Young 2 participants 2 messages Feb 21, 2010

Subsystems (2)
lore
Share & tools
lore

Dave Young

author
#0 lore raw

PATCH 9/17 sysctl extern cleanup - rcu

Extern declarations in sysctl.c should be move to their own head file, and then include them in relavant .c files.

Move rcutorture_runnable extern declaration to linux/rcupdate.h

---
 include/linux/rcupdate.h |    4 ++++
 kernel/sysctl.c          |    3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)
include/linux/rcupdate.h +4 -0
@@ -41,6 +41,10 @@
 #include <linux/lockdep.h>
 #include <linux/completion.h>
 
+#ifdef CONFIG_RCU_TORTURE_TEST
+extern int rcutorture_runnable; /* for sysctl */
+#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
+
 /**
  * struct rcu_head - callback structure for use with RCU
  * @next: next update requests in a list
kernel/sysctl.c +0 -3
@@ -75,9 +75,6 @@
 
 /* External variables not in a header file. */
 extern int max_threads;
-#ifdef CONFIG_RCU_TORTURE_TEST
-extern int rcutorture_runnable;
-#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
 #ifdef CONFIG_BLOCK
 extern int blk_iopoll_enabled;
 #endif
Reviewed-by on v1 9/17
#1 lore raw
Quoted 4 lines · Dave Young

Extern declarations in sysctl.c should be move to their own head file, and then include them in relavant .c files.

Move rcutorture_runnable extern declaration to linux/rcupdate.h

Quoted 32 lines
---
 include/linux/rcupdate.h |    4 ++++
 kernel/sysctl.c          |    3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)
include/linux/rcupdate.h +4 -0
@@ -41,6 +41,10 @@
 #include <linux/lockdep.h>
 #include <linux/completion.h>
 
+#ifdef CONFIG_RCU_TORTURE_TEST
+extern int rcutorture_runnable; /* for sysctl */
+#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
+
 /**
  * struct rcu_head - callback structure for use with RCU
  * @next: next update requests in a list
kernel/sysctl.c +0 -3
@@ -75,9 +75,6 @@
 
 /* External variables not in a header file. */
 extern int max_threads;
-#ifdef CONFIG_RCU_TORTURE_TEST
-extern int rcutorture_runnable;
-#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
 #ifdef CONFIG_BLOCK
 extern int blk_iopoll_enabled;
 #endif