Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-18 Thread Dan Carpenter
On Sat, Sep 16, 2017 at 02:18:52PM +0200, Paolo Cretaro wrote: > On 16/09/2017 13:37, Dan Carpenter wrote: > > On Sat, Sep 16, 2017 at 01:11:29PM +0200, Paolo Cretaro wrote: > >> Hi Dan, > >> just minor nitpicking on the commit message: > >> > >> On 08/09/2017 12:53, Dan Carpenter wrote: > >>> The

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-16 Thread Jonathan Cameron
On Sat, 16 Sep 2017 14:18:52 +0200 Paolo Cretaro wrote: > On 16/09/2017 13:37, Dan Carpenter wrote: > > On Sat, Sep 16, 2017 at 01:11:29PM +0200, Paolo Cretaro wrote: > >> Hi Dan, > >> just minor nitpicking on the commit message: > >> > >> On 08/09/2017 12:53, Dan

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-16 Thread Paolo Cretaro
On 16/09/2017 13:37, Dan Carpenter wrote: > On Sat, Sep 16, 2017 at 01:11:29PM +0200, Paolo Cretaro wrote: >> Hi Dan, >> just minor nitpicking on the commit message: >> >> On 08/09/2017 12:53, Dan Carpenter wrote: >>> The background of this code is that we can either use the default >>> tables or

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-16 Thread Paolo Cretaro
Hi Dan, just minor nitpicking on the commit message: On 08/09/2017 12:53, Dan Carpenter wrote: > The background of this code is that we can either use the default > tables or load our own table with sysfs. The default tables are three > element arrays of struct tsl2x7x_lux. If we load the table

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-16 Thread Dan Carpenter
On Sat, Sep 16, 2017 at 01:11:29PM +0200, Paolo Cretaro wrote: > Hi Dan, > just minor nitpicking on the commit message: > > On 08/09/2017 12:53, Dan Carpenter wrote: > > The background of this code is that we can either use the default > > tables or load our own table with sysfs. The default

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-15 Thread Brian Masney
On Fri, Sep 08, 2017 at 01:53:43PM +0300, Dan Carpenter wrote: > The background of this code is that we can either use the default > tables or load our own table with sysfs. The default tables are three > element arrays of struct tsl2x7x_lux. If we load the table with sysfs > then we can have as

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-08 Thread Dan Carpenter
On Fri, Sep 08, 2017 at 03:48:58PM +0200, walter harms wrote: > > - while (i < (TSL2X7X_MAX_LUX_TABLE_SIZE * 3)) { > > + while (i < TSL2X7X_MAX_LUX_TABLE_SIZE) { > > offset += snprintf(buf + offset, PAGE_SIZE, "%u,%u,%u,", > > chip->tsl2x7x_device_lux[i].ratio,

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-08 Thread walter harms
Am 08.09.2017 12:53, schrieb Dan Carpenter: > The background of this code is that we can either use the default > tables or load our own table with sysfs. The default tables are three > element arrays of struct tsl2x7x_lux. If we load the table with sysfs > then we can have as many as nine

[PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-08 Thread Dan Carpenter
The background of this code is that we can either use the default tables or load our own table with sysfs. The default tables are three element arrays of struct tsl2x7x_lux. If we load the table with sysfs then we can have as many as nine elements. Which ever way we do it, the last element is