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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 13 Jan 2016 17:16:07 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Wolfram Sang <wsa@...-dreams.de>
Cc:	Linux I2C <linux-i2c@...r.kernel.org>,
	Linux-sh list <linux-sh@...r.kernel.org>,
	Magnus Damm <magnus.damm@...il.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
	Jan Luebbe <jlu@...gutronix.de>
Subject: Re: [RFC v2 3/4] i2c: mux: demux-pinctrl: add driver

Hi Wolfram,

On Wed, Jan 13, 2016 at 1:55 PM, Wolfram Sang <wsa@...-dreams.de> wrote:
>> > +struct i2c_demux_pinctrl_priv {
>> > +       int cur_chan;
>> > +       int num_chan;
>>
>> This is always positive, so you can make num_chan and a few loop counters
>> unsigned.
>
> Nope, sadly not. cur_chan can get a -ERRNO, and the type of num_chan is

Sorry for the bad quoting, my comment applied to num_chan only.

> defined by the return type of of_count_phandle_with_args().

But you will never store negative error codes returned by that function, as you
won't get to the storing part...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ