2010-02-21 14:24:27

by Dave Young

[permalink] [raw]
Subject: [PATCH -mm 09/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

Signed-off-by: Dave Young <[email protected]>
Acked-by: Josh Triplett <[email protected]>
---
include/linux/rcupdate.h | 4 ++++
kernel/sysctl.c | 3 ---
2 files changed, 4 insertions(+), 3 deletions(-)

--- linux-2.6.32.orig/include/linux/rcupdate.h 2010-02-21 09:35:58.013190490 +0800
+++ linux-2.6.32/include/linux/rcupdate.h 2010-02-21 10:03:53.296358225 +0800
@@ -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
--- linux-2.6.32.orig/kernel/sysctl.c 2010-02-21 09:58:40.029722800 +0800
+++ linux-2.6.32/kernel/sysctl.c 2010-02-21 10:01:30.257204779 +0800
@@ -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


2010-02-21 16:58:11

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH -mm 09/17] sysctl extern cleanup - rcu

On Sun, Feb 21, 2010 at 10:24:12PM +0800, Dave Young wrote:
> 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

Reviewed-by: "Paul E. McKenney" <[email protected]>

> Signed-off-by: Dave Young <[email protected]>
> Acked-by: Josh Triplett <[email protected]>
> ---
> include/linux/rcupdate.h | 4 ++++
> kernel/sysctl.c | 3 ---
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> --- linux-2.6.32.orig/include/linux/rcupdate.h 2010-02-21 09:35:58.013190490 +0800
> +++ linux-2.6.32/include/linux/rcupdate.h 2010-02-21 10:03:53.296358225 +0800
> @@ -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
> --- linux-2.6.32.orig/kernel/sysctl.c 2010-02-21 09:58:40.029722800 +0800
> +++ linux-2.6.32/kernel/sysctl.c 2010-02-21 10:01:30.257204779 +0800
> @@ -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