From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932729AbbHYQ3j (ORCPT ); Tue, 25 Aug 2015 12:29:39 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:55637 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932409AbbHYQ3h (ORCPT ); Tue, 25 Aug 2015 12:29:37 -0400 X-Originating-IP: 50.43.43.179 Date: Tue, 25 Aug 2015 09:29:29 -0700 From: Josh Triplett To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, "Paul E. McKenney" , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan Subject: Re: [PATCH] kernel: make rcu/tree_trace.c explicitly non-modular Message-ID: <20150825162928.GA28226@x> References: <1440516197-25370-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1440516197-25370-1-git-send-email-paul.gortmaker@windriver.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 25, 2015 at 11:23:17AM -0400, Paul Gortmaker wrote: > The Kconfig currently controlling compilation of this code is: > > init/Kconfig:config TREE_RCU_TRACE > init/Kconfig: def_bool RCU_TRACE && ( TREE_RCU || PREEMPT_RCU ) > > ...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 file 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 if desired. > > We don't replace module.h with init.h since the file already has that. > We also delete the moduleparam.h include that is left over from > commit 64db4cfff99c04cd5f550357edcc8780f96b54a2 (""Tree RCU": scalable > classic RCU implementation") since it is not needed here either. > > We leave some tags like MODULE_AUTHOR for documentation purposes. > > Cc: "Paul E. McKenney" > Cc: Josh Triplett > Cc: Steven Rostedt > Cc: Mathieu Desnoyers > Cc: Lai Jiangshan > Signed-off-by: Paul Gortmaker Seems reasonable, though leaving the MODULE_* metadata commented out at the end seems odd. I'd suggest using the DESCRIPTION to update the comment at the top (which is actually outdated and needs s/classic/hierarchical/), dropping the MODULE_LICENSE (redundant with the license header), and changing "MODULE_AUTHOR" into an "Author:" under the copyright. With that: Reviewed-by: Josh Triplett > diff --git a/kernel/rcu/tree_trace.c b/kernel/rcu/tree_trace.c > index 6fc4c5ff3bb5..e8a0a11e8dd7 100644 > --- a/kernel/rcu/tree_trace.c > +++ b/kernel/rcu/tree_trace.c > @@ -33,9 +33,7 @@ > #include > #include > #include > -#include > #include > -#include > #include > #include > #include > @@ -487,16 +485,10 @@ free_out: > debugfs_remove_recursive(rcudir); > return 1; > } > +device_initcall(rcutree_trace_init); > > -static void __exit rcutree_trace_cleanup(void) > -{ > - debugfs_remove_recursive(rcudir); > -} > - > - > -module_init(rcutree_trace_init); > -module_exit(rcutree_trace_cleanup); > - > +/* > MODULE_AUTHOR("Paul E. McKenney"); > MODULE_DESCRIPTION("Read-Copy Update tracing for hierarchical implementation"); > MODULE_LICENSE("GPL"); > +*/ > -- > 2.5.0 >