Hi, On 06 October 2016 17:34, Steve Twiss wrote: > On 06 October 2016 11:38, Keerthy [mailto:a0393...@ti.com], wrote: > > + int cell_num; > > No need of cell_num. > > > + cell_num = ARRAY_SIZE(da9061_devs); > > No need of the above assignment > > > + cell_num = ARRAY_SIZE(da9062_devs); > > No need of the above assignment > > > > + ret = mfd_add_devices(chip->dev, PLATFORM_DEVID_NONE, cell, > > + cell_num, NULL, irq_base, > > Use ARRAY_SIZE(cell) instead if cell_num > > Okay. Can do that.
Okay. I cannot do that. Dropped that change. drivers/mfd/da9062-core.c: In function 'da9062_i2c_probe': ./include/linux/bug.h:34:45: error: negative width in bit-field '<anonymous>' #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) ^ ./include/linux/compiler-gcc.h:64:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO' #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) ^ ./include/linux/kernel.h:53:59: note: in expansion of macro '__must_be_array' #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) ^ drivers/mfd/da9062-core.c:919:10: note: in expansion of macro 'ARRAY_SIZE' ARRAY_SIZE(cell), NULL, irq_base, ^