Re: [RFC v2 3/4] i2c: mux: demux-pinctrl: add driver

From: Wolfram Sang
Date: Wed Jan 13 2016 - 07:55:27 EST



> > +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
defined by the return type of of_count_phandle_with_args().

Attachment: signature.asc
Description: Digital signature