Re: [PATCH v6 01/24] i2c-mux: add common data for every i2c-mux instance

2016-04-15 Thread Peter Rosin
Wolfram Sang wrote: > > > wonder even more if we couldn't supply num_adapters to i2c_mux_alloc() > > > and reserve the memory statically. i2c busses are not > > > dynamic/hot-pluggable so that should be good enough? > > > > Yes, that would work, but it would take some restructuring in some of > >

Re: [PATCH v6 01/24] i2c-mux: add common data for every i2c-mux instance

2016-04-15 Thread Wolfram Sang
> > I'd suggest to rename 'adapters' into 'num_adapters' throughout this > > patch. I think it makes the code a lot easier to understand. > > Hmm, you mean just the variable names, right? And not function names > such as i2c_mux_reserve_(num_)adapters? Yes, only variable names. > > Despite that

Re: [PATCH v6 01/24] i2c-mux: add common data for every i2c-mux instance

2016-04-13 Thread Peter Rosin
Hi! On 2016-04-11 22:46, Wolfram Sang wrote: > Hi Peter, > > first high-level review: > >> +int i2c_mux_reserve_adapters(struct i2c_mux_core *muxc, int adapters) > > I'd suggest to rename 'adapters' into 'num_adapters' throughout this > patch. I think it makes the code a lot easier to understan

Re: [PATCH v6 01/24] i2c-mux: add common data for every i2c-mux instance

2016-04-11 Thread Wolfram Sang
Hi Peter, first high-level review: > +int i2c_mux_reserve_adapters(struct i2c_mux_core *muxc, int adapters) I'd suggest to rename 'adapters' into 'num_adapters' throughout this patch. I think it makes the code a lot easier to understand. > +{ > + struct i2c_adapter **adapter; > + > + if