Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: patrice.chotard@st.com (Patrice Chotard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] pinctrl: st: st_pctl_dt_parse_groups simplify expression
Date: Mon, 7 Nov 2016 10:05:13 +0100	[thread overview]
Message-ID: <1ac9af0e-0a00-757b-6981-0ff9461fbbb3@st.com> (raw)
In-Reply-To: <20161105143515.4668-1-xypron.glpk@gmx.de>



On 11/05/2016 03:35 PM, Heinrich Schuchardt wrote:
> for_each_property_of_node(pins, pp) checks that pp is not NULL.
> So there is no need to check it inside the loop.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/pinctrl/pinctrl-st.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index 8308f15..676efcc 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -1181,7 +1181,7 @@ static int st_pctl_dt_parse_groups(struct device_node *np,
>  		if (!strcmp(pp->name, "name"))
>  			continue;
>  
> -		if (pp  && (pp->length/sizeof(__be32)) >= OF_GPIO_ARGS_MIN) {
> +		if (pp->length / sizeof(__be32) >= OF_GPIO_ARGS_MIN) {
>  			npins++;
>  		} else {
>  			pr_warn("Invalid st,pins in %s node\n", np->name);
> 

Hi Heinrich

Acked-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

  reply	other threads:[~2016-11-07  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-05 14:35 [PATCH 1/1] pinctrl: st: st_pctl_dt_parse_groups simplify expression Heinrich Schuchardt
2016-11-07  9:05 ` Patrice Chotard [this message]
2016-11-08 10:27 ` Linus Walleij

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=1ac9af0e-0a00-757b-6981-0ff9461fbbb3@st.com \
    --to=patrice.chotard@st.com \
    --cc=linux-arm-kernel@lists.infradead.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