Re: [PATCH v3 20/28] staging: iio: tsl2583: don't assume an unsigned int is 32 bits

2016-12-05 Thread Dan Carpenter
On Thu, Nov 10, 2016 at 04:25:56AM -0500, Brian Masney wrote: > in_illuminance_lux_table_store assumes that an unsigned int is 32 bits. It's a totally safe assumption. The only problem is that it's less readable than sizeof(). regards, dan carpenter _

Re: [PATCH v3 20/28] staging: iio: tsl2583: don't assume an unsigned int is 32 bits

2016-11-12 Thread Jonathan Cameron
On 10/11/16 09:25, Brian Masney wrote: > in_illuminance_lux_table_store assumes that an unsigned int is 32 bits. > Replace this with sizeof(unsigned int). > > Signed-off-by: Brian Masney Preferred to use sizeof(value[0]) in case it changes type sometime in the future? > --- > drivers/staging/ii

[PATCH v3 20/28] staging: iio: tsl2583: don't assume an unsigned int is 32 bits

2016-11-10 Thread Brian Masney
in_illuminance_lux_table_store assumes that an unsigned int is 32 bits. Replace this with sizeof(unsigned int). Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2583.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/s