All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: fenglinw@codeaurora.org, Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>,
	linux-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
	collinsd@quicinc.com, aghayal@qti.qualcomm.com,
	wruan@quicinc.com, kgunda@qti.qualcomm.com
Subject: Re: [PATCH V1 3/3] pinctrl: qcom: spmi-gpio: Correct power_source range check
Date: Wed, 12 Jul 2017 14:33:14 -0700	[thread overview]
Message-ID: <20170712213314.GL1618@tuxbook> (raw)
In-Reply-To: <20170613061707.13892-4-fenglinw@codeaurora.org>

On Mon 12 Jun 23:16 PDT 2017, fenglinw@codeaurora.org wrote:

> From: Fenglin Wu <fenglinw@codeaurora.org>
> 
> Power source selection in DIG_VIN_CTL is indexed from 0, in the range
> check it shouldn't be equal to the total number of power sources.
> 
> Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

This patch is unrelated to the other patches in the series, when this is
the case it's better to send it on its own.

Regards,
Bjorn

> ---
>  drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> index 581309d..1fd677c 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> @@ -500,7 +500,7 @@ static int pmic_gpio_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
>  			pad->is_enabled = false;
>  			break;
>  		case PIN_CONFIG_POWER_SOURCE:
> -			if (arg > pad->num_sources)
> +			if (arg >= pad->num_sources)
>  				return -EINVAL;
>  			pad->power_source = arg;
>  			break;
> -- 
> Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project.
> 

  parent reply	other threads:[~2017-07-12 21:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13  6:16 [PATCH V1 0/3] Add LV/MV subtypes support for QCOM PMIC GPIOs fenglinw
2017-06-13  6:16 ` [PATCH V1 1/3] pinctrl: qcom: spmi-gpio: Add support for GPIO LV/MV subtype fenglinw
2017-06-18 14:04   ` Rob Herring
2017-06-19  1:00     ` Fenglin Wu
2017-06-19  1:00       ` Fenglin Wu
2017-06-19  2:07       ` Fenglin Wu
2017-06-20 11:15   ` Linus Walleij
2017-07-05 23:51     ` Fenglin Wu
2017-07-06  5:02       ` Bjorn Andersson
     [not found]   ` <20170613061707.13892-2-fenglinw-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-07-12 20:55     ` Bjorn Andersson
2017-07-12 20:55       ` Bjorn Andersson
2017-07-13  3:21       ` Fenglin Wu
2017-06-13  6:16 ` [PATCH V1 2/3] pinctrl: qcom: spmi-gpio: Add dtest route for digital input fenglinw
2017-06-18 14:04   ` Rob Herring
2017-06-20 11:14   ` Linus Walleij
     [not found]   ` <20170613061707.13892-3-fenglinw-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-07-12 21:24     ` Bjorn Andersson
2017-07-12 21:24       ` Bjorn Andersson
2017-07-13  5:27       ` Fenglin Wu
2017-07-14 18:19         ` Bjorn Andersson
2017-06-13  6:16 ` [PATCH V1 3/3] pinctrl: qcom: spmi-gpio: Correct power_source range check fenglinw
2017-06-20  9:33   ` Linus Walleij
2017-07-12 21:33   ` Bjorn Andersson [this message]
2017-07-13  5:55     ` Fenglin Wu

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=20170712213314.GL1618@tuxbook \
    --to=bjorn.andersson@linaro.org \
    --cc=aghayal@qti.qualcomm.com \
    --cc=andy.gross@linaro.org \
    --cc=collinsd@quicinc.com \
    --cc=david.brown@linaro.org \
    --cc=fenglinw@codeaurora.org \
    --cc=kgunda@qti.qualcomm.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=wruan@quicinc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.