Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757495AbcJHC5r (ORCPT ); Fri, 7 Oct 2016 22:57:47 -0400 Received: from bear.ext.ti.com ([198.47.19.11]:49730 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbcJHC5j (ORCPT ); Fri, 7 Oct 2016 22:57:39 -0400 Subject: Re: [PATCH V1 01/10] mfd: da9061: MFD core support To: Steve Twiss References: <1eca0af9-64d5-7476-2847-71ecf9331395@ti.com> <6ED8E3B22081A4459DAC7699F3695FB7018CCE2712@SW-EX-MBX02.diasemi.com> CC: LINUX-KERNEL , Lee Jones From: Keerthy Message-ID: <0c189115-dff4-bf50-dd37-ac9ee690dd5a@ti.com> Date: Sat, 8 Oct 2016 08:27:25 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <6ED8E3B22081A4459DAC7699F3695FB7018CCE2712@SW-EX-MBX02.diasemi.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1461 Lines: 42 On Friday 07 October 2016 08:02 PM, Steve Twiss wrote: > Hi, > > On 06 October 2016 17:34, Steve Twiss wrote: >> On 06 October 2016 11:38, Keerthy [mailto:a0393675@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 '' > #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. >