From: Mark Brown <broonie@kernel.org>
To: Markus Pargmann <mpa@pengutronix.de>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
"Krzysztof Kozłowski" <k.kozlowski@samsung.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH v2 3/4] regulator: fixed: Use gpio_is_valid
Date: Mon, 13 Oct 2014 16:47:33 +0200 [thread overview]
Message-ID: <20141013144733.GK27755@sirena.org.uk> (raw)
In-Reply-To: <1412776028-15655-4-git-send-email-mpa@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 891 bytes --]
On Wed, Oct 08, 2014 at 03:47:07PM +0200, Markus Pargmann wrote:
> Use gpio_is_valid instead of an explicit comparison with 0.
>
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> ---
> drivers/regulator/fixed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
> index 441a3e90e266..696f53cc1927 100644
> --- a/drivers/regulator/fixed.c
> +++ b/drivers/regulator/fixed.c
> @@ -157,7 +157,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
>
> drvdata->desc.fixed_uV = config->microvolts;
>
> - if (config->gpio >= 0) {
> + if (gpio_is_valid(config->gpio)) {
Have you audited all users to ensure that they don't rely on zero being
ignored? Right now we're sharing the core behaviour here so the same
issues apply to this platform data as apply to the core.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-10-13 14:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 13:47 [PATCH v2 0/4] regulator: Fix core behaviour for gpio 0 Markus Pargmann
2014-10-08 13:47 ` [PATCH v2 1/4] regulator: Add ena_gpio_initialized to regulator_config Markus Pargmann
2014-10-13 14:49 ` Mark Brown
2014-10-08 13:47 ` [PATCH v2 2/4] regulator: Set ena_gpio_initialized in regulator drivers Markus Pargmann
2014-10-08 14:53 ` Krzysztof Kozlowski
2014-10-10 6:00 ` Markus Pargmann
2014-10-13 14:42 ` Mark Brown
2014-11-03 13:22 ` Markus Pargmann
2014-10-08 13:47 ` [PATCH v2 3/4] regulator: fixed: Use gpio_is_valid Markus Pargmann
2014-10-13 14:47 ` Mark Brown [this message]
2014-11-03 13:38 ` Markus Pargmann
2014-10-08 13:47 ` [PATCH v2 4/4] regulator: gpio: " Markus Pargmann
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=20141013144733.GK27755@sirena.org.uk \
--to=broonie@kernel.org \
--cc=k.kozlowski@samsung.com \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpa@pengutronix.de \
/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®