Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756636AbcJGOd0 convert rfc822-to-8bit (ORCPT ); Fri, 7 Oct 2016 10:33:26 -0400 Received: from mail1.bemta5.messagelabs.com ([195.245.231.153]:27804 "EHLO mail1.bemta5.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753222AbcJGOdO (ORCPT ); Fri, 7 Oct 2016 10:33:14 -0400 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNKsWRWlGSWpSXmKPExsUSt3Opse6vjd/ DDRY/U7KYOX8Jq8X9r0cZLS7vmsPmwOxx59oeNo/jN7YzeXzeJBfAHMWamZeUX5HAmvF70iTW gotcFTsaT7M3MPZydDFycQgJLGWUeH5vBWMXIycHm4ChxLw378FsEQF5ib1LT7KA2MwCQRL7n v1mBbGFBawllsx4BhTnAKqxkTh0IgSi3Eni7JRt7CA2i4CKRN+zyWA2r0CARPfRN2wQu04ySj yeeBxsDqOArMSXxtXMEPPFJW49mc8EYksICEgs2XOeGcIWlXj5+B8rhC0vsfbXE6i4vcTre+/ AbpAQ0JfoayyGCBtKrJp2gAXCNpf4dfcsE8R4HYkFuz+xQdjaEssWvmaGuE1Q4uTMJywTGMVm IbliFpKWWUhaZiFpWcDIsopRvTi1qCy1SNdSL6koMz2jJDcxM0fX0MBULze1uDgxPTUnMalYL zk/dxMjMNIYgGAH49pW50OMkhxMSqK8Lyu/hwvxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4P24AS gnWJSanlqRlpkDjHmYtAQHj5IIbwtImre4IDG3ODMdInWKUVFKnDcdJCEAksgozYNrg6WZS4y yUsK8jECHCPEUpBblZpagyr9iFOdgVBLmvQoyhSczrwRu+iugxUxAi/OXfgFZXJKIkJJqYBT2 +xXTaOFvemddja5n7s2Ff77rCT5y0jU+LjOnMI73+eOGvvOmBx+UPfjGvENFO8yN23SD88Wzq 6X32sctzVr7ePJqI8vyj3xbBHV/i+2xOXvmyEcehn8GKyMX5dn/Nr4pGL7BusnQuE1Hr3rCoc /3I9hN5uS8my5w8eu/D1N3WPFrugUtb1NiKc5INNRiLipOBABlifPOLgMAAA== X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-6.tower-180.messagelabs.com!1475850746!50679681!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked From: Steve Twiss To: "'Keerthy'" CC: LINUX-KERNEL , Lee Jones Subject: RE: [PATCH V1 01/10] mfd: da9061: MFD core support Thread-Topic: [PATCH V1 01/10] mfd: da9061: MFD core support Thread-Index: AQHSH7B2+vZXDgCwfUSyWOdSraCHm6CbKy4AgAAU/8CAAchQYA== Date: Fri, 7 Oct 2016 14:32:25 +0000 Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7018CCE2712@SW-EX-MBX02.diasemi.com> References: <1eca0af9-64d5-7476-2847-71ecf9331395@ti.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.26.77] x-kse-attachmentfiltering-interceptor-info: protection disabled x-kse-serverinfo: sw-ex-cashub01.diasemi.com, 9 x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: Clean, bases: 07/10/2016 12:39:00 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1341 Lines: 35 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, ^