kernel: make rcu/tiny_plugin.h explicitly non-modular
PATCH 1/1 kernel: make rcu/tiny_plugin.h explicitly non-modular
The Kconfig currently controlling compilation of this code is:
init/Kconfig:config TINY_RCU
init/Kconfig: bool
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that when reading the code there is no doubt it is builtin-only.
Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We could consider moving this to an earlier initcall (subsys?) if desired.
We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.
--- kernel/rcu/tiny_plugin.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
kernel/rcu/tiny_plugin.h +2 -13
@@ -23,7 +23,7 @@*/ #include <linux/kthread.h> -#include <linux/module.h> +#include <linux/init.h> #include <linux/debugfs.h> #include <linux/seq_file.h>
@@ -122,18 +122,7 @@ free_out:debugfs_remove_recursive (rcudir);return 1 ; } - -static void __exit rcutiny_trace_cleanup(void) -{ -debugfs_remove_recursive (rcudir); -} - -module_init (rcutiny_trace_init); -module_exit (rcutiny_trace_cleanup); - -MODULE_AUTHOR ("Paul E. McKenney" ); -MODULE_DESCRIPTION ("Read-Copy Update tracing for tiny implementation" ); -MODULE_LICENSE ("GPL" ); +device_initcall (rcutiny_trace_init);static void check_cpu_stall (struct rcu_ctrlblk *rcp) {
Signature · 1 line
2.6.1
Quoted 17 lines · Paul Gortmaker
The
Kconfigcurrently controlling compilation of this code is:init/Kconfig:config
TINY_RCU
init/Kconfig: bool...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that when reading the code there is no doubt it is builtin-only.
Since
module_inittranslates todevice_initcallin the non-modular case, the init ordering remains unchanged with this commit. We could consider moving this to an earlier initcall (subsys?) if desired.We also delete the
MODULE_LICENSEtag etc. since all that information is already contained at the top of the file in the comments.
Quoted 6 lines
Cc "Paul E. McKenney" <[email protected]>Cc Josh Triplett <[email protected]>Cc Steven Rostedt <[email protected]>Cc Mathieu Desnoyers <[email protected]>Cc Lai Jiangshan <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Queued for review and testing, thank you!
Thanx, Paul
Quoted 40 lines
--- kernel/rcu/tiny_plugin.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)kernel/rcu/tiny_plugin.h +2
-13@@ -23,7 +23,7 @@*/ #include <linux/kthread.h> -#include <linux/module.h> +#include <linux/init.h> #include <linux/debugfs.h> #include <linux/seq_file.h> @@ -122,18 +122,7 @@ free_out:debugfs_remove_recursive (rcudir);return 1 ; } - -static void __exit rcutiny_trace_cleanup(void) -{ -debugfs_remove_recursive (rcudir); -} - -module_init (rcutiny_trace_init); -module_exit (rcutiny_trace_cleanup); - -MODULE_AUTHOR ("Paul E. McKenney" ); -MODULE_DESCRIPTION ("Read-Copy Update tracing for tiny implementation" ); -MODULE_LICENSE ("GPL" ); +device_initcall (rcutiny_trace_init);static void check_cpu_stall (struct rcu_ctrlblk *rcp) {Signature · 1 line
2.6.1