From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
Alexandre Courbot <gnurou@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH] gpiolib: fix warning about iterator
Date: Sun, 27 Dec 2015 19:01:54 +0530 [thread overview]
Message-ID: <20151227133154.GA8735@sudip-pc> (raw)
In-Reply-To: <CACRpkdZA7m=YzjVmQwzoKNzMu+QiOeA9s3Wu_axZYMw=5j-LnQ@mail.gmail.com>
On Sat, Dec 26, 2015 at 10:31:15PM +0100, Linus Walleij wrote:
> On Sat, Dec 26, 2015 at 8:58 AM, Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> wrote:
>
> > We were getting build warning about "iterator" being used uninitialized.
> > Use iterator properly to fix the build warning and in the process remove
> > the variable "pos" which is not required now.
> >
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
>
> Aha there is a real patch solving the problem. Sorry Ross,
> had to drop your patch and replace it with this.
>
> Patch applied!
oops .. i think i have a small mistake in the patch. After the loop for
list_for_each_entry ends we are having:
if (iterator->base + iterator->ngpio <= chip->base)
goto found;
But at the end of the loop iterator will point to head. The condition in
the loop is &pos->member != (head).
I am sending v2 as reply to this thread. It will be great if you can
review and apply that instead of this one.
Sorry for the inconvenience. I guess christmas effect. :)
regards
sudip
next prev parent reply other threads:[~2015-12-27 13:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-26 7:58 [PATCH] gpiolib: fix warning about iterator Sudip Mukherjee
2015-12-26 21:31 ` Linus Walleij
2015-12-27 13:31 ` Sudip Mukherjee [this message]
2015-12-27 13:36 ` [PATCH v2] " Sudip Mukherjee
2015-12-28 0:35 ` 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=20151227133154.GA8735@sudip-pc \
--to=sudipm.mukherjee@gmail.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ross.zwisler@linux.intel.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 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).