From patchwork Mon Sep 9 23:56:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Cartwright X-Patchwork-Id: 2863581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D93F9BF43F for ; Tue, 10 Sep 2013 00:15:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E5C8D20251 for ; Tue, 10 Sep 2013 00:15:33 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA5F02024A for ; Tue, 10 Sep 2013 00:15:32 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJBbn-0007w4-Uj; Tue, 10 Sep 2013 00:15:08 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJBbj-0005UU-Dz; Tue, 10 Sep 2013 00:15:03 +0000 Received: from smtp.codeaurora.org ([198.145.11.231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJBbY-0005Se-L7 for linux-arm-kernel@lists.infradead.org; Tue, 10 Sep 2013 00:14:53 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 8502213EF6C; Tue, 10 Sep 2013 00:14:31 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 773FA13EF71; Tue, 10 Sep 2013 00:14:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from joshc.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com [67.52.129.61]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: joshc@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1542E13EF6C; Tue, 10 Sep 2013 00:14:31 +0000 (UTC) Received: by joshc.qualcomm.com (Postfix, from userid 1000) id 9D3AC60E08; Mon, 9 Sep 2013 19:13:58 -0500 (CDT) Message-Id: <5350fa5571d24b68d6bb27959d3ef761ccb95b00.1378771874.git.joshc@codeaurora.org> From: Josh Cartwright Date: Mon, 9 Sep 2013 18:56:08 -0500 Subject: [PATCH 1/2] ARM: msm: trout: fix 'pointer from integer' warnings To: David Brown , Bryan Huntsman , Daniel Walker X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130909_201452_896501_993AEA60 X-CRM114-Status: GOOD ( 14.92 ) X-Spam-Score: -2.8 (--) Cc: linux-arm-msm@vger.kernel.org, arm@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fix several errors, all in the following form: arch/arm/mach-msm/board-trout-gpio.c: In function 'trout_gpio_irq_ack': arch/arm/mach-msm/board-trout-gpio.c:120:2: warning: passing argument 2 of '__raw_writeb' makes pointer from integer without a cast [enabled by default] writeb(mask, TROUT_CPLD_BASE + reg); ^ In file included from include/linux/io.h:22:0, from arch/arm/mach-msm/board-trout-gpio.c:16: arch/arm/include/asm/io.h:81:20: note: expected 'volatile void *' but argument is of type 'unsigned int' static inline void __raw_writeb(u8 val, volatile void __iomem *addr) ^ arch/arm/mach-msm/board-trout-gpio.c: In function 'trout_gpio_irq_mask': arch/arm/mach-msm/board-trout-gpio.c:135:2: warning: passing argument 2 of '__raw_writeb' makes pointer from integer without a cast [enabled by default] writeb(reg_val, TROUT_CPLD_BASE + reg); ^ Signed-off-by: Josh Cartwright --- arch/arm/mach-msm/board-trout-gpio.c | 8 ++++---- arch/arm/mach-msm/board-trout.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-msm/board-trout-gpio.c b/arch/arm/mach-msm/board-trout-gpio.c index 87e1d01..af47465 100644 --- a/arch/arm/mach-msm/board-trout-gpio.c +++ b/arch/arm/mach-msm/board-trout-gpio.c @@ -115,7 +115,7 @@ static void trout_gpio_irq_ack(struct irq_data *d) { int bank = TROUT_INT_TO_BANK(d->irq); uint8_t mask = TROUT_INT_TO_MASK(d->irq); - int reg = TROUT_BANK_TO_STAT_REG(bank); + void __iomem *reg = TROUT_BANK_TO_STAT_REG(bank); /*printk(KERN_INFO "trout_gpio_irq_ack irq %d\n", d->irq);*/ writeb(mask, TROUT_CPLD_BASE + reg); } @@ -126,7 +126,7 @@ static void trout_gpio_irq_mask(struct irq_data *d) uint8_t reg_val; int bank = TROUT_INT_TO_BANK(d->irq); uint8_t mask = TROUT_INT_TO_MASK(d->irq); - int reg = TROUT_BANK_TO_MASK_REG(bank); + void __iomem *reg = TROUT_BANK_TO_MASK_REG(bank); local_irq_save(flags); reg_val = trout_int_mask[bank] |= mask; @@ -142,7 +142,7 @@ static void trout_gpio_irq_unmask(struct irq_data *d) uint8_t reg_val; int bank = TROUT_INT_TO_BANK(d->irq); uint8_t mask = TROUT_INT_TO_MASK(d->irq); - int reg = TROUT_BANK_TO_MASK_REG(bank); + void __iomem *reg = TROUT_BANK_TO_MASK_REG(bank); local_irq_save(flags); reg_val = trout_int_mask[bank] &= ~mask; @@ -172,7 +172,7 @@ static void trout_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) int j, m; unsigned v; int bank; - int stat_reg; + void __iomem *stat_reg; int int_base = TROUT_INT_START; uint8_t int_mask; diff --git a/arch/arm/mach-msm/board-trout.h b/arch/arm/mach-msm/board-trout.h index b2379ed..82326ca 100644 --- a/arch/arm/mach-msm/board-trout.h +++ b/arch/arm/mach-msm/board-trout.h @@ -67,10 +67,10 @@ #define TROUT_GPIO_START (128) -#define TROUT_GPIO_INT_MASK0_REG (0x0c) -#define TROUT_GPIO_INT_STAT0_REG (0x0e) -#define TROUT_GPIO_INT_MASK1_REG (0x14) -#define TROUT_GPIO_INT_STAT1_REG (0x10) +#define TROUT_GPIO_INT_MASK0_REG IOMEM(0x0c) +#define TROUT_GPIO_INT_STAT0_REG IOMEM(0x0e) +#define TROUT_GPIO_INT_MASK1_REG IOMEM(0x14) +#define TROUT_GPIO_INT_STAT1_REG IOMEM(0x10) #define TROUT_GPIO_HAPTIC_PWM (28) #define TROUT_GPIO_PS_HOLD (25)