lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 27 Dec 2015 19:01:54 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	Ross Zwisler <ross.zwisler@...ux.intel.com>,
	Alexandre Courbot <gnurou@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH] gpiolib: fix warning about iterator

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@...il.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@...torindia.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ