From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754650Ab3HKQ4D (ORCPT ); Sun, 11 Aug 2013 12:56:03 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:38019 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754300Ab3HKQwD (ORCPT ); Sun, 11 Aug 2013 12:52:03 -0400 X-IronPort-AV: E=Sophos;i="4.89,857,1367964000"; d="scan'208";a="23717947" From: Julia Lawall To: Linus Walleij Cc: kernel-janitors@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/16] arch/arm/mach-ux500/cpu-db8500.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Date: Sun, 11 Aug 2013 18:51:44 +0200 Message-Id: <1376239917-15594-4-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr> References: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e) ,...) // Signed-off-by: Julia Lawall --- Not compiled. arch/arm/mach-ux500/cpu-db8500.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 12eee81..a73bb3d 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -157,7 +157,8 @@ static void __init db8500_add_gpios(struct device *parent) .supports_sleepmode = true, }; - dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base), + dbx500_add_gpios(parent, db8500_gpio_base, + ARRAY_SIZE(db8500_gpio_base), IRQ_DB8500_GPIO0, &pdata); dbx500_add_pinctrl(parent, "pinctrl-db8500", U8500_PRCMU_BASE); } From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Date: Sun, 11 Aug 2013 16:51:44 +0000 Subject: [PATCH 3/16] arch/arm/mach-ux500/cpu-db8500.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Message-Id: <1376239917-15594-4-git-send-email-Julia.Lawall@lip6.fr> List-Id: References: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr> In-Reply-To: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e) ,...) // Signed-off-by: Julia Lawall --- Not compiled. arch/arm/mach-ux500/cpu-db8500.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 12eee81..a73bb3d 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -157,7 +157,8 @@ static void __init db8500_add_gpios(struct device *parent) .supports_sleepmode = true, }; - dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base), + dbx500_add_gpios(parent, db8500_gpio_base, + ARRAY_SIZE(db8500_gpio_base), IRQ_DB8500_GPIO0, &pdata); dbx500_add_pinctrl(parent, "pinctrl-db8500", U8500_PRCMU_BASE); } From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia.Lawall@lip6.fr (Julia Lawall) Date: Sun, 11 Aug 2013 18:51:44 +0200 Subject: [PATCH 3/16] arch/arm/mach-ux500/cpu-db8500.c: Avoid using ARRAY_AND_SIZE(e) as a function argument In-Reply-To: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr> References: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr> Message-ID: <1376239917-15594-4-git-send-email-Julia.Lawall@lip6.fr> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e) ,...) // Signed-off-by: Julia Lawall --- Not compiled. arch/arm/mach-ux500/cpu-db8500.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 12eee81..a73bb3d 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -157,7 +157,8 @@ static void __init db8500_add_gpios(struct device *parent) .supports_sleepmode = true, }; - dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base), + dbx500_add_gpios(parent, db8500_gpio_base, + ARRAY_SIZE(db8500_gpio_base), IRQ_DB8500_GPIO0, &pdata); dbx500_add_pinctrl(parent, "pinctrl-db8500", U8500_PRCMU_BASE); }