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, > > chip->tsl2x7x_device_lux[i].ch0, > > Is that TSL2X7X_MAX_LUX_TABLE_SIZE needed at all ? Nope. Not needed but not harmful. Adding redundant limit checks is pretty normal so it's fine. I'm not going to remove it. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel