From: Mark Brown <broonie@kernel.org>
To: Saurabh Sengar <saurabh.truth@gmail.com>
Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: of: removing two variables min_uV and max_uV
Date: Sun, 1 Nov 2015 11:29:11 +0900 [thread overview]
Message-ID: <20151101022911.GD28319@sirena.org.uk> (raw)
In-Reply-To: <1446303691-30795-1-git-send-email-saurabh.truth@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
On Sat, Oct 31, 2015 at 08:31:31PM +0530, Saurabh Sengar wrote:
> - min_uV = of_get_property(np, "regulator-min-microvolt", NULL);
> - if (min_uV)
> - constraints->min_uV = be32_to_cpu(*min_uV);
> + if (!of_property_read_u32(np, "regulator-max-microvolt", &pval))
> + constraints->max_uV = pval;
> /* Only one voltage? Then make sure it's set. */
> - if (min_uV && max_uV && constraints->min_uV == constraints->max_uV)
> + if (constraints->min_uV == constraints->max_uV)
> constraints->apply_uV = true;
Your new code is not equivalent to the existing code. The new code will
set apply_uV even if the DT properties are not present which will in
turn mean that we will end up attempting to apply a setting of 0V if
that happens which is not desirable.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-11-02 8:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-31 15:01 Saurabh Sengar
2015-11-01 2:29 ` Mark Brown [this message]
2015-11-02 9:48 ` [PATCH v2] " Saurabh Sengar
2015-11-03 17:29 ` Mark Brown
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=20151101022911.GD28319@sirena.org.uk \
--to=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=saurabh.truth@gmail.com \
/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
all inboxes | Powered by JetHome®