From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757210AbcBIPcD (ORCPT ); Tue, 9 Feb 2016 10:32:03 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:1379 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754343AbcBIPcB (ORCPT ); Tue, 9 Feb 2016 10:32:01 -0500 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Tue, 09 Feb 2016 07:31:24 -0800 Message-ID: <56BA03B9.2010801@nvidia.com> Date: Tue, 9 Feb 2016 20:50:25 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Lee Jones , , Subject: Re: [PATCH] mfd: Provide MACRO to declare commonly defined MFD cell attributes References: <1455028027-1527-1-git-send-email-lee.jones@linaro.org> In-Reply-To: <1455028027-1527-1-git-send-email-lee.jones@linaro.org> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRUKMAIL102.nvidia.com (10.25.59.20) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 09 February 2016 07:57 PM, Lee Jones wrote: > + > +#define MFD_CELL_NAME(_name) \ > + { \ > + MFD_CELL_ALL(_name, NULL, NULL, 0, NULL, NULL) \ > + } > + > struct irq_domain; It is failed in compilation as we can not use ARRAY_SIZE(NULL) static struct mfd_cell max77620_children[] = { MFD_CELL_NAME("max77620-pinctrl"), }; CC drivers/mfd/max77620.o drivers/mfd/max77620.c:57:2: warning: braces around scalar initializer MFD_CELL_NAME("max77620-pinctrl"), include/linux/compiler-gcc.h:64:63: warning: taking address of expression of type 'void' #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) ^ include/linux/bug.h:33:55: note: in definition of macro 'BUILD_BUG_ON_ZERO' #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) ^ include/linux/compiler-gcc.h:64:46: note: in expansion of macro '__same_type' #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))