Thread (27 messages) 27 messages, 4 authors, 2016-10-20

Re: [PATCH V1 01/10] mfd: da9061: MFD core support

From: Keerthy <hidden>
Date: 2016-10-08 02:57:47


On Friday 07 October 2016 08:02 PM, Steve Twiss wrote:
Hi,

On 06 October 2016 17:34, Steve Twiss wrote:
quoted
On 06 October 2016 11:38, Keerthy [mailto:a0393675@ti.com], wrote:
quoted
+	int cell_num;
No need of cell_num.
quoted
+		cell_num = ARRAY_SIZE(da9061_devs);
No need of the above assignment
quoted
+		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,
          ^
Okay. yes i got it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help