From patchwork Wed Nov 9 02:47:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 124471 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EBED81007D5 for ; Wed, 9 Nov 2011 13:53:01 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RNyFJ-00046v-8F; Wed, 09 Nov 2011 02:50:37 +0000 Received: from na3sys009aog120.obsmtp.com ([74.125.149.140]) by merlin.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1RNyF7-00043z-8B for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2011 02:50:26 +0000 Received: from MSI-MTA.marvell.com ([65.219.4.132]) by na3sys009aob120.postini.com ([74.125.148.12]) with SMTP ID DSNKTrnqagWuUiPpcN+Mf1vBUKMbzLEdEMy+@postini.com; Tue, 08 Nov 2011 18:50:25 PST Received: from maili.marvell.com ([10.68.76.51]) by MSI-MTA.marvell.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Nov 2011 18:50:07 -0800 Received: from localhost (unknown [10.38.164.65]) by maili.marvell.com (Postfix) with ESMTP id 738558A002; Tue, 8 Nov 2011 18:50:07 -0800 (PST) From: Haojian Zhuang To: eric.y.miao@gmail.com, grant.likely@secretlab.ca, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, arnd@arndb.de Subject: [PATCH v7 01/11] ARM: mmp: fix build error on gpio Date: Wed, 9 Nov 2011 10:47:21 +0800 Message-Id: <1320806851-13928-2-git-send-email-haojian.zhuang@marvell.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1320806851-13928-1-git-send-email-haojian.zhuang@marvell.com> References: <1320806851-13928-1-git-send-email-haojian.zhuang@marvell.com> MIME-Version: 1.0 X-OriginalArrivalTime: 09 Nov 2011 02:50:07.0552 (UTC) FILETIME=[4A439400:01CC9E8A] X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.140 listed in list.dnswl.org] Cc: Haojian Zhuang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Parameters of GPIO_REG() should be assigned as volatile. arch/arm/plat-pxa/include/plat/gpio.h: In function ‘gpio_get_value’: arch/arm/plat-pxa/include/plat/gpio.h:12:21: error: invalid operands to binary & (have ‘void *’ and ‘int’) arch/arm/plat-pxa/include/plat/gpio.h: In function ‘gpio_set_value’: arch/arm/plat-pxa/include/plat/gpio.h:21:4: error: lvalue required as left operand of assignment arch/arm/plat-pxa/include/plat/gpio.h:23:4: error: lvalue required as left operand of assignment Signed-off-by: Haojian Zhuang --- arch/arm/mach-mmp/include/mach/gpio-pxa.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-mmp/include/mach/gpio-pxa.h b/arch/arm/mach-mmp/include/mach/gpio-pxa.h index d14eeaf..99b4ce1 100644 --- a/arch/arm/mach-mmp/include/mach/gpio-pxa.h +++ b/arch/arm/mach-mmp/include/mach/gpio-pxa.h @@ -7,7 +7,7 @@ #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000) #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) -#define GPIO_REG(x) (GPIO_REGS_VIRT + (x)) +#define GPIO_REG(x) (*(volatile u32 *)(GPIO_REGS_VIRT + (x))) #define NR_BUILTIN_GPIO IRQ_GPIO_NUM