Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1384456
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Paul Gortmaker <paul.gortmaker@windriver.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular |
| Date | Thu, 21 Apr 2016 19:50:02 +0200 |
| Message-ID | <rqqTM-4ry-5@gated-at.bofh.it> (permalink) |
| References | <rllrK-6RI-47@gated-at.bofh.it> <rq2eK-1vN-15@gated-at.bofh.it> <rq4Tg-3DS-5@gated-at.bofh.it> <rqdjQ-27E-13@gated-at.bofh.it> <rqhQu-61u-23@gated-at.bofh.it> <rqmdt-NB-25@gated-at.bofh.it> <rqmQc-1lx-57@gated-at.bofh.it> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="us-ascii" |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 64 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <linux-kernel@vger.kernel.org>, Len Brown <len.brown@intel.com>, <rcochran@linutronix.de>, <linux-pm@vger.kernel.org> |
| X-Original-Date | Thu, 21 Apr 2016 13:42:18 -0400 |
| X-Original-Message-ID | <20160421174217.GM13379@windriver.com> |
| X-Original-References | <20160407165355.GA9188@linaro.org> <1461165906-21614-1-git-send-email-paul.gortmaker@windriver.com> <20160420181322.GM5862@linaro.org> <20160421031249.GH13379@windriver.com> <20160421080427.GC14010@linaro.org> <20160421124454.GJ13379@windriver.com> <20160421132137.GA18670@linaro.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1384456 |
Show key headers only | View raw
[Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular] On 21/04/2016 (Thu 15:21) Daniel Lezcano wrote:
> On Thu, Apr 21, 2016 at 08:44:55AM -0400, Paul Gortmaker wrote:
> > [Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular] On 21/04/2016 (Thu 10:04) Daniel Lezcano wrote:
> >
> > > On Wed, Apr 20, 2016 at 11:12:49PM -0400, Paul Gortmaker wrote:
> > >
> > > [ ... ]
> > >
> > > > > > We replace module.h with moduleparam.h since the file does declare
> > > > > > some module parameters, and leaving them as such is currently the
> > > > > > easiest way to remain compatible with existing boot arg use cases.
> > > > >
> > > > > What about using __setup() ? so module* disappear from the file.
> > > >
> > > > No, it can't be __setup since moduleparam uses an instance of the
> > > > filename as a prefix to the boot arg, and __setup does not. And we
> > > > should stay compatible with existing boot arg use cases for people
> > > > who have embedded such a setting in their grub config a long time
> > > > ago and forgot it. It would take looking at and likely extending the
> > > > early_param macro to provide a syntax compatible instance of what
> > > > the module_param currently does if I recall correctly -- hence the
> > > > above comment in the commit log.
> > >
> > > -module_param(max_cstate, int, 0444);
> > > +static int __init max_cstate_param(char *str)
> > > +{
> > > + max_cstate = simple_strtol(str, NULL, 0);
> > > + return 1;
> > > +}
> > > +__setup("intel_idle.max_cstate=", max_cstate_param);
> >
> > Yeah, I recall thinking it would be that easy too, but there was
> > something that happens when you manually insert the dot in there that
> > breaks processing. I'd have to re-test to remind myself what failed.
>
> Ok.
>
> I quickly tested this code snippet and, except I missed something, it
> worked.
Maybe it was when I used early_param in testing that it failed....
>
> That said, I looked around and found that using module_param() for
> non-modular is found in several places, so it is common. I don't like to
> find references to modular code when the the caller is not supposed to be
Agreed, I wasn't a fan of it either, and had it on my to-do list to
circle back around and revisit them once I'd got all the dead code
removed tree wide, and as you say, there are instances already, so I
figured no real drastic rush needed for that.
> modular but that's the situation today.
>
> So I will let Len and you decice what to do ;)
>
> Other than that: Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Thanks for the input on this. It is Len's subsystem, so he gets the final
say and not me. :)
Paul.
--
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-04-20 17:30 +0200
Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-20 20:20 +0200
Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-04-21 05:20 +0200
Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-21 10:10 +0200
Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-04-21 14:50 +0200
Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-21 15:30 +0200
Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-04-21 19:50 +0200
csiph-web