From patchwork Fri Feb 5 16:20:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102843 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp60908lbl; Fri, 5 Feb 2016 08:21:44 -0800 (PST) X-Received: by 10.66.118.198 with SMTP id ko6mr21058459pab.122.1454689304459; Fri, 05 Feb 2016 08:21:44 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x16si24793583pfa.181.2016.02.05.08.21.42; Fri, 05 Feb 2016 08:21:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755992AbcBEQVg (ORCPT + 30 others); Fri, 5 Feb 2016 11:21:36 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:61671 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755936AbcBEQVe (ORCPT ); Fri, 5 Feb 2016 11:21:34 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0MVYxn-1aY1hD0HTr-00YyZr; Fri, 05 Feb 2016 17:21:08 +0100 From: Arnd Bergmann To: Imre Kaloz , Krzysztof Halasa Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ARM: ixp4xx: use normal prototype for {read, write}s{b, w, l} Date: Fri, 5 Feb 2016 17:20:48 +0100 Message-Id: <1454689262-613421-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:ApAYLpGEhmn9hiRFwPq+6Ovu4Of4qcTfm3vymjWpftOhRlGT6x5 ScYqHvK9UhuxY9V10Fj+BNf5SUa34wQfT0+g9wPPuKVO1Lbohh16ezOCAjAHIyFswW8Llka QB02lk5nVMMhybCUlmkWMWFpYRfUXMsqvyE3zwcvri/F47eetmZfh8kwoamhv+iIToS5gge TWzIZpnpArHZfZTabtswQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:uamnD9zGk8g=:RbgwhrvhxdqfOferaX5ImW aDwUJ+G3pE+gv+mdNB5NkXx7p4J5oSNoJfGTwZiIurXebst3dFWtVvOYM82zNuo9/WL4A4fwH ymBUwodeIGGILztzGIvdOjOLw9tnEI72Ewt6ChIy1NeeMUB6vWjiOBTQmbIP+Gtk9p3/ealGU 0fXKgGI1GieCsoaAcCIS2v7JMwsAFWLwnYWDo7eu/Egc+3dfAvn4riYfBZl/Gq7jS7noxEozq 2CwMP5vWw42yztgs80JYi4BZRC7PvtD09qNOvqFtY9PN2xhfWXhJyf80lPZeeVgvWf7aP8f1v hq85upL3j+ubVFCkI0kZNciudS+S4dgDeSJiUGPVPl/QYLwaA8X/W6JJuC6ASJbGJDvAz1JxC 5GQAnf8oUqK4DVaTVc0zHpul2YLx4d/sHp/DZdGXlRvhVD8nP6jV4Lx8VrgX9aCV/F3OlDRZT tN0hM4ZW2cYSKiHKuAdYCBmw/6i7QONL6rDLF+NJs0BtzMq24wlb9JEngC1gC/iVg5xv1LyYA 7RgWtNF6L2YqIO1CB1zIW1R/jFFUrENmJ9E7Fgt3qajS/YdDZiEM36IXd58ovkQC4gUnuKQiT 4GZLkFjr5rsA9RKUXI82PqGr6YGFje/CymQVnbpgjIeVT6lpEz+v009SmNdYyTALe7OQiMq2n NQ2kY8CDR8ANrLSL1JhV1/Zg2ju3KJtEBAY3VgoH0cKm+B+LAsu0USFEhjyPzAFzyEdc= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ixp4xx defines the arguments to its __indirect_writesb() and other functions as pointers to fixed-size data. This is not necessarily wrong, and it works most of the time, but it causes warnings in at least one driver: drivers/net/ethernet/smsc/smc91x.c: In function 'smc_rcv': drivers/net/ethernet/smsc/smc91x.c:495:21: error: passing argument 2 of '__indirect_readsw' from incompatible pointer type [-Werror=incompatible-pointer-types] SMC_PULL_DATA(lp, data, packet_len - 4); All other definitions of the same functions pass void pointers, so doing the same here avoids the warnings. Signed-off-by: Arnd Bergmann --- arch/arm/mach-ixp4xx/include/mach/io.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) -- 2.7.0 diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 7a0c13bf4269..d04d3ec97ac0 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h @@ -95,8 +95,10 @@ static inline void __indirect_writeb(u8 value, volatile void __iomem *p) } static inline void __indirect_writesb(volatile void __iomem *bus_addr, - const u8 *vaddr, int count) + const void *p, int count) { + const u8 *vaddr = p; + while (count--) writeb(*vaddr++, bus_addr); } @@ -118,8 +120,10 @@ static inline void __indirect_writew(u16 value, volatile void __iomem *p) } static inline void __indirect_writesw(volatile void __iomem *bus_addr, - const u16 *vaddr, int count) + const void *p, int count) { + const u16 *vaddr = p; + while (count--) writew(*vaddr++, bus_addr); } @@ -137,8 +141,9 @@ static inline void __indirect_writel(u32 value, volatile void __iomem *p) } static inline void __indirect_writesl(volatile void __iomem *bus_addr, - const u32 *vaddr, int count) + const void *p, int count) { + const u32 *vaddr = p; while (count--) writel(*vaddr++, bus_addr); } @@ -160,8 +165,10 @@ static inline u8 __indirect_readb(const volatile void __iomem *p) } static inline void __indirect_readsb(const volatile void __iomem *bus_addr, - u8 *vaddr, u32 count) + void *p, u32 count) { + u8 *vaddr = p; + while (count--) *vaddr++ = readb(bus_addr); } @@ -183,8 +190,10 @@ static inline u16 __indirect_readw(const volatile void __iomem *p) } static inline void __indirect_readsw(const volatile void __iomem *bus_addr, - u16 *vaddr, u32 count) + void *p, u32 count) { + u16 *vaddr = p; + while (count--) *vaddr++ = readw(bus_addr); } @@ -204,8 +213,10 @@ static inline u32 __indirect_readl(const volatile void __iomem *p) } static inline void __indirect_readsl(const volatile void __iomem *bus_addr, - u32 *vaddr, u32 count) + void *p, u32 count) { + u32 *vaddr = p; + while (count--) *vaddr++ = readl(bus_addr); }