[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdVnYMmrt3PPb-cg4C889RB5pwKN+LX6O-1VSX1oaKY1ww@mail.gmail.com>
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