From: "Shevchenko, Andriy" <andriy.shevchenko@intel.com>
To: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Cc: "linus.walleij@linaro.org" <linus.walleij@linaro.org>
Subject: the needless loop?
Date: Wed, 21 Oct 2015 16:45:01 +0000 [thread overview]
Message-ID: <1445445900.22669.41.camel@intel.com> (raw)
Hi!
Catch such code in pinconf.c
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;
}
}
I do not get how the result of strcmp() would be different during the
loop. Can you elaborate?
--
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
next reply other threads:[~2015-10-21 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 16:45 Shevchenko, Andriy [this message]
2015-10-27 15:27 ` the needless loop? Linus Walleij
2015-10-28 10:07 ` Laurent MEUNIER
2015-10-28 10:50 ` Shevchenko, Andriy
2015-10-28 14:35 ` 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=1445445900.22669.41.camel@intel.com \
--to=andriy.shevchenko@intel.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).