From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Nishanth Menon <nm@ti.com>
Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Viresh Kumar <viresh.kumar@linaro.org>,
Shawn Guo <shawn.guo@linaro.org>
Subject: Re: [PATCH 1/2] regulator: core: return err value for regulator_get if there is no DT binding
Date: Fri, 5 Apr 2013 11:17:54 +0100 [thread overview]
Message-ID: <20130405101754.GD6597@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1365135708-23886-2-git-send-email-nm@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
On Thu, Apr 04, 2013 at 11:21:47PM -0500, Nishanth Menon wrote:
> commit 6d191a5fc7a969d972f1681e1c23781aecb06a61
> (regulator: core: Don't defer probe if there's no DT binding for a supply)
>
> Attempted to differentiate between regulator_get() with an actual
> DT binding for the supply and when there is none to avoid unnecessary
> deferal.
So, this is an extremely long and hence difficult to understand and
follow commit message which manages to miss out mentioning the core
issue which is that we're ignoring the return value from lookup_dev().
I had to actually look at the code to understand.
What should be being said here is that the ret value supplied by
regulator_dev_lookup() is being ignored by _regulator_get().
> mutex_unlock(®ulator_list_mutex);
> - return regulator;
> + return ret ? ERR_PTR(ret) : regulator;
Please implement this so it looks like the rest of the function -
everywhere else in the function we just make regulator an ERR_PTR() and
goto out, we should do the same.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-04-05 10:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 4:21 [PATCH 0/2] cpufreq/regulator: Handle regulators that defer probe with device tree bindings Nishanth Menon
2013-04-05 4:21 ` [PATCH 1/2] regulator: core: return err value for regulator_get if there is no DT binding Nishanth Menon
2013-04-05 10:17 ` Mark Brown [this message]
2013-04-16 21:45 ` [PATCH V2 " Nishanth Menon
2013-04-05 4:21 ` [PATCH 2/2] cpufreq: cpufreq-cpu0: defer probe when regulator is not ready Nishanth Menon
2013-04-05 5:13 ` [PATCH 0/2] cpufreq/regulator: Handle regulators that defer probe with device tree bindings Viresh Kumar
2013-04-05 6:13 ` Shawn Guo
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=20130405101754.GD6597@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=cpufreq@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@sisk.pl \
--cc=shawn.guo@linaro.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;
as well as URLs for NNTP newsgroup(s).