From: Julian Calaby <julian.calaby@gmail.com> To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com> Cc: Rusty Russell <rusty@rustcorp.com.au>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, linux-wireless <linux-wireless@vger.kernel.org>, keescook@chromium.org, casey@schaufler-ca.com, cocci@systeme.lip6.fr, "Luis R. Rodriguez" <mcgrof@suse.com>, Jani Nikula <jani.nikula@intel.com>, Christoph Hellwig <hch@infradead.org>, Andrew Morton <akpm@linux-foundation.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Hannes Reinecke <hare@suse.de>, Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@kernel.org> Subject: Re: [PATCH v1 4/6] moduleparam.h: add module_param_config_*() helpers Date: Tue, 21 Apr 2015 09:42:21 +1000 [thread overview] Message-ID: <CAGRGNgVZyFQgmb9kLq1-rvJQwr5NnBHCEMqgn3CNmD5ki6w=ng@mail.gmail.com> (raw) In-Reply-To: <1429572637-30234-5-git-send-email-mcgrof@do-not-panic.com> Hi Luis, You made a spelling mistake: On Tue, Apr 21, 2015 at 9:30 AM, Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote: > From: "Luis R. Rodriguez" <mcgrof@suse.com> > > This adds a couple of bool module_param_config_*() helpers > which are designed to let us easily associate a booloean > module parameter with an associated kernel configuration > option, and to help us remove #ifdef'ery eyesores. > > Cc: Rusty Russell <rusty@rustcorp.com.au> > Cc: Jani Nikula <jani.nikula@intel.com> > Cc: Christoph Hellwig <hch@infradead.org> > Cc: Andrew Morton <akpm@linux-foundation.org> > Cc: Geert Uytterhoeven <geert@linux-m68k.org> > Cc: Hannes Reinecke <hare@suse.de> > Cc: Kees Cook <keescook@chromium.org> > Cc: Tejun Heo <tj@kernel.org> > Cc: Ingo Molnar <mingo@kernel.org> > Cc: linux-kernel@vger.kernel.org > Cc: cocci@systeme.lip6.fr > Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> > --- > include/linux/moduleparam.h | 37 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h > index 7e00799..fdf7b87 100644 > --- a/include/linux/moduleparam.h > +++ b/include/linux/moduleparam.h > @@ -155,6 +155,43 @@ struct kparam_array > __MODULE_PARM_TYPE(name, #type) > > /** > + * module_param_config_on_off - bool parameter with run time override > + * @name: a valid C identifier which is the parameter name. > + * @value: the actual lvalue to alter. > + * @perm: visibility in sysfs. > + * @config: kernel parameter which will enable this option if this > + * kernel configuration option has been enabled. > + * > + * This lets you define a bool module paramter which by default will be s/paramter/parameter/ > + * set to true if the config option has been set on your kernel's > + * configuration, otherwise it is set to false. > + */ > +#define module_param_config_on_off(name, var, perm, config) \ > + static bool var = IS_ENABLED(config); \ > + module_param_named(name, var, bool, perm); > + > +/** > + * module_param_config_on - bool parameter with run time enablement override > + * @name: a valid C identifier which is the parameter name. > + * @value: the actual lvalue to alter. > + * @perm: visibility in sysfs. > + * @config: kernel parameter which will enable this option if this > + * kernel configuration option has been enabled. > + * > + * This lets you define a bool module paramter which by default will be Here too. Thanks, -- Julian Calaby Email: julian.calaby@gmail.com Profile: http://www.google.com/profiles/julian.calaby/
WARNING: multiple messages have this Message-ID (diff)
From: julian.calaby@gmail.com (Julian Calaby) To: cocci@systeme.lip6.fr Subject: [Cocci] [PATCH v1 4/6] moduleparam.h: add module_param_config_*() helpers Date: Tue, 21 Apr 2015 09:42:21 +1000 [thread overview] Message-ID: <CAGRGNgVZyFQgmb9kLq1-rvJQwr5NnBHCEMqgn3CNmD5ki6w=ng@mail.gmail.com> (raw) In-Reply-To: <1429572637-30234-5-git-send-email-mcgrof@do-not-panic.com> Hi Luis, You made a spelling mistake: On Tue, Apr 21, 2015 at 9:30 AM, Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote: > From: "Luis R. Rodriguez" <mcgrof@suse.com> > > This adds a couple of bool module_param_config_*() helpers > which are designed to let us easily associate a booloean > module parameter with an associated kernel configuration > option, and to help us remove #ifdef'ery eyesores. > > Cc: Rusty Russell <rusty@rustcorp.com.au> > Cc: Jani Nikula <jani.nikula@intel.com> > Cc: Christoph Hellwig <hch@infradead.org> > Cc: Andrew Morton <akpm@linux-foundation.org> > Cc: Geert Uytterhoeven <geert@linux-m68k.org> > Cc: Hannes Reinecke <hare@suse.de> > Cc: Kees Cook <keescook@chromium.org> > Cc: Tejun Heo <tj@kernel.org> > Cc: Ingo Molnar <mingo@kernel.org> > Cc: linux-kernel at vger.kernel.org > Cc: cocci at systeme.lip6.fr > Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> > --- > include/linux/moduleparam.h | 37 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h > index 7e00799..fdf7b87 100644 > --- a/include/linux/moduleparam.h > +++ b/include/linux/moduleparam.h > @@ -155,6 +155,43 @@ struct kparam_array > __MODULE_PARM_TYPE(name, #type) > > /** > + * module_param_config_on_off - bool parameter with run time override > + * @name: a valid C identifier which is the parameter name. > + * @value: the actual lvalue to alter. > + * @perm: visibility in sysfs. > + * @config: kernel parameter which will enable this option if this > + * kernel configuration option has been enabled. > + * > + * This lets you define a bool module paramter which by default will be s/paramter/parameter/ > + * set to true if the config option has been set on your kernel's > + * configuration, otherwise it is set to false. > + */ > +#define module_param_config_on_off(name, var, perm, config) \ > + static bool var = IS_ENABLED(config); \ > + module_param_named(name, var, bool, perm); > + > +/** > + * module_param_config_on - bool parameter with run time enablement override > + * @name: a valid C identifier which is the parameter name. > + * @value: the actual lvalue to alter. > + * @perm: visibility in sysfs. > + * @config: kernel parameter which will enable this option if this > + * kernel configuration option has been enabled. > + * > + * This lets you define a bool module paramter which by default will be Here too. Thanks, -- Julian Calaby Email: julian.calaby at gmail.com Profile: http://www.google.com/profiles/julian.calaby/
next prev parent reply other threads:[~2015-04-20 23:42 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-20 23:30 [PATCH v1 0/6] module params: few simplifications Luis R. Rodriguez 2015-04-20 23:30 ` [Cocci] " Luis R. Rodriguez 2015-04-20 23:30 ` Luis R. Rodriguez 2015-04-20 23:30 ` [Cocci] " Luis R. Rodriguez 2015-04-21 10:20 ` Arend van Spriel 2015-04-21 10:20 ` [Cocci] " Arend van Spriel 2015-04-20 23:30 ` [PATCH v1 2/6] kernel/module.c: use generic module param operaters for sig_enforce Luis R. Rodriguez 2015-04-20 23:30 ` [Cocci] " Luis R. Rodriguez 2015-04-20 23:30 ` [PATCH v1 3/6] kernel/params.c: generalize bool_enable_only Luis R. Rodriguez 2015-04-20 23:30 ` [Cocci] " Luis R. Rodriguez 2015-04-20 23:30 ` [PATCH v1 4/6] moduleparam.h: add module_param_config_*() helpers Luis R. Rodriguez 2015-04-20 23:30 ` [Cocci] " Luis R. Rodriguez 2015-04-20 23:42 ` Julian Calaby [this message] 2015-04-20 23:42 ` Julian Calaby 2015-04-21 16:41 ` Luis R. Rodriguez 2015-04-21 16:41 ` [Cocci] " Luis R. Rodriguez 2015-04-21 15:21 ` Tejun Heo 2015-04-21 15:21 ` [Cocci] " Tejun Heo 2015-04-21 16:55 ` Luis R. Rodriguez 2015-04-21 16:55 ` [Cocci] " Luis R. Rodriguez 2015-04-21 20:58 ` Tejun Heo 2015-04-21 20:58 ` [Cocci] " Tejun Heo 2015-04-22 7:15 ` Rusty Russell 2015-04-22 7:15 ` [Cocci] " Rusty Russell 2015-04-22 15:42 ` Luis R. Rodriguez 2015-04-20 23:30 ` [PATCH v1 5/6] kernel/workqueue.c: use module_param_config_on_off() for power_efficient Luis R. Rodriguez 2015-04-20 23:30 ` [Cocci] " Luis R. Rodriguez 2015-04-20 23:30 ` [PATCH v1 6/6] kernel/module.c: use module_param_config_on() for sig_enforce Luis R. Rodriguez 2015-04-20 23:30 ` [Cocci] " Luis R. Rodriguez
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAGRGNgVZyFQgmb9kLq1-rvJQwr5NnBHCEMqgn3CNmD5ki6w=ng@mail.gmail.com' \ --to=julian.calaby@gmail.com \ --cc=akpm@linux-foundation.org \ --cc=casey@schaufler-ca.com \ --cc=cocci@systeme.lip6.fr \ --cc=geert@linux-m68k.org \ --cc=hare@suse.de \ --cc=hch@infradead.org \ --cc=jani.nikula@intel.com \ --cc=keescook@chromium.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-wireless@vger.kernel.org \ --cc=mcgrof@do-not-panic.com \ --cc=mcgrof@suse.com \ --cc=mingo@kernel.org \ --cc=rusty@rustcorp.com.au \ --cc=tj@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.