From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>,
David Arcari <darcari@redhat.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: pcc-cpufreq: Fail initialization if driver cannot be registered
Date: Fri, 28 Jun 2019 00:00:37 +0200 [thread overview]
Message-ID: <5175938.k7Tzu7MeQO@kreacher> (raw)
In-Reply-To: <20190607030546.7kjg466wbkzxfym4@vireshk-i7>
On Friday, June 7, 2019 5:05:46 AM CEST Viresh Kumar wrote:
> On 06-06-19, 14:50, David Arcari wrote:
> > Make pcc_cpufreq_init() return error codes when the driver cannot be
> > registered. Otherwise the driver can shows up loaded via lsmod even
> > though it failed initialization. This is confusing to the user.
> >
> > Signed-off-by: David Arcari <darcari@redhat.com>
> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> > drivers/cpufreq/pcc-cpufreq.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
> > index 1e5e64643c3a..fdc767fdbe6a 100644
> > --- a/drivers/cpufreq/pcc-cpufreq.c
> > +++ b/drivers/cpufreq/pcc-cpufreq.c
> > @@ -582,10 +582,10 @@ static int __init pcc_cpufreq_init(void)
> >
> > /* Skip initialization if another cpufreq driver is there. */
> > if (cpufreq_get_current_driver())
> > - return 0;
> > + return -EEXIST;
> >
> > if (acpi_disabled)
> > - return 0;
> > + return -ENODEV;
> >
> > ret = pcc_cpufreq_probe();
> > if (ret) {
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Applied, thanks!
prev parent reply other threads:[~2019-06-27 22:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 18:50 [PATCH] cpufreq: pcc-cpufreq: Fail initialization if driver cannot be registered David Arcari
2019-06-07 3:05 ` Viresh Kumar
2019-06-27 22:00 ` Rafael J. Wysocki [this message]
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=5175938.k7Tzu7MeQO@kreacher \
--to=rjw@rjwysocki.net \
--cc=darcari@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=viresh.kumar@linaro.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox