linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Laurent Meunier <laurent.meunier@st.com>, linux-gpio@vger.kernel.org
Cc: linus.walleij@linaro.org
Subject: Re: [PATCH] pinctrl: pinconf: remove needless loop
Date: Wed, 28 Oct 2015 19:00:49 +0200	[thread overview]
Message-ID: <1446051649.6332.59.camel@linux.intel.com> (raw)
In-Reply-To: <1446042599-15093-1-git-send-email-laurent.meunier@st.com>

On Wed, 2015-10-28 at 15:29 +0100, Laurent Meunier wrote:
> This removes a needless loop which was catched in pinconf.c.

I'm not a fan of irregular verbs, but here we are: catched -> caught.

> 
> Suggested-by: Andriy Shevchenko <andriy.shevchenko@intel.com>

Sometimes the broken Evolution uses wrong address. Please add "linux."
part after "@". Also, I prefer to use Andy since it's how I'm known
here.

Otherwise:

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Laurent Meunier <laurent.meunier@st.com>
> ---
>  drivers/pinctrl/pinconf.c | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
> index 1fc09dc..19af718 100644
> --- a/drivers/pinctrl/pinconf.c
> +++ b/drivers/pinctrl/pinconf.c
> @@ -414,7 +414,7 @@ static int pinconf_dbg_config_print(struct
> seq_file *s, void *d)
>  	struct pinctrl_dev *pctldev;
>  	const struct pinconf_ops *confops = NULL;
>  	struct dbg_cfg *dbg = &pinconf_dbg_conf;
> -	int i, j;
> +	int i;
>  	unsigned long config;
>  
>  	mutex_lock(&pinctrl_maps_mutex);
> @@ -428,13 +428,10 @@ static int pinconf_dbg_config_print(struct
> seq_file *s, void *d)
>  		if (strcmp(map->name, dbg->state_name))
>  			continue;
>  
> -		for (j = 0; j < map->data.configs.num_configs; j++)
> {
> -			if (!strcmp(map->data.configs.group_or_pin,
> -					dbg->pin_name)) {
> -				/* We found the right pin / state */
> -				found = map;
> -				break;
> -			}
> +		if (!strcmp(map->data.configs.group_or_pin, dbg-
> >pin_name)) {
> +			/* We found the right pin */
> +			found = map;
> +			break;
>  		}
>  	}
>  

-- 
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-10-28 17:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 14:29 [PATCH] pinctrl: pinconf: remove needless loop Laurent Meunier
2015-10-28 17:00 ` Andy Shevchenko [this message]
2015-10-29 13:25   ` Laurent MEUNIER

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=1446051649.6332.59.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=laurent.meunier@st.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.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).