From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752739AbbKWNzE (ORCPT ); Mon, 23 Nov 2015 08:55:04 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:63123 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbbKWNzC (ORCPT ); Mon, 23 Nov 2015 08:55:02 -0500 From: Arnd Bergmann To: Imre Kaloz , Krzysztof Halasa Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: ixp4xx: fix read{b,w,l} return types Date: Mon, 23 Nov 2015 14:54:34 +0100 Message-ID: <4362140.iyWOWZXsMe@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:1CBfaWn35E8SsZhPYtK5F2TXquqVNt9SNJnxRVSWNAOuJsErp8k tV17YB4ZpmQp/Vw/EsWxh5feQYAR8fbvk6MeMUs84UzqAOfHdgYkBf7gCtjadxRwmZth3F8 IuztLXEUyfTVyj4AXKO/t+w+SZ5Zp4SkdKOidF2Nx5uECCjr6VaCvjr8f9NiXqHDFjA+V3z sMZeqN8/CyTk6rFXMMgXA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZkI/LOB94tA=:kznhVeoTP0z98jYFOEtq3G gJRrxI/rF9LozycmFZ5QUSd9l2HzxMkMkgFHqbBecsWd+bAymhiyaGvSGon3YHI4Qw4oVrwch ilQOlmLnWwRFHyvbXO6cTZ9HsUdeSBraaqS5GGr36vR9fpwkyE+xj5AYwjj0kxnL0l7PAmTR9 S1J4SIuwui4vMpNazTZsU7XfkwxprzAs8zXQH61cg2M4e+EiBzy3fgfPTLrtkT2Qis7BCpBLm OlA0Ios5INqzraluub7G7P6pQIO5JLxB7NDEqDzTI9GgOWB/jMHeYBd7r6lcbnQUYQFCpPiSI kDQZ0SHpVuHamXg6B5vRQMZvdcNgbW2q7RKJsCVORy06quMtP1POi9GqBz97pVWOJ3gxWhb69 fyiAyQKG/JQCQdG0euFXP1o7i2rE4wVLK3LxC9GnZRbJTZnr0HqJOy0kQ/3y+Kx2ngBHzJaXi bh4l9EsteckMATvZrpEDkg6zWCH86IbdEGM/13tIqeos7744QztcicbtMfmVXT5IbKm9hHTR2 3Gp60YIw/tGQmJP+IrhpPbyQxdRyW6lsAiqHR1tyWeOlN0C2wxrhL22XxBxkujIEsDZfJ458L 6Iez56qHquIhJhmxvGJXii5Fd/T0/IbAcQjhG1QZmUqBlhTCnMLohI9qP12FHkpJporeVTii+ rDxJxtOomar6Ty7Z6zye7m4qDGRmqdknZ2uD5Xg3LGvkP7whNOyGzSovJ9P//8MVybWa2gckR 00ocK1QPp840vzmO Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On ixp4xx, the readl() function returns an 'unsigned long' output when indirect I/O is used. This is unlike any other platform, and it causes lots of harmless compiler warnings, such as: drivers/ata/libahci.c: In function 'ahci_show_host_version': drivers/ata/libahci.c:254:22: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=] drivers/block/mtip32xx/mtip32xx.c: In function 'mtip_hw_read_registers': drivers/block/mtip32xx/mtip32xx.c:2602:31: warning: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=] drivers/block/cciss.c: In function 'print_cfg_table': drivers/block/cciss.c:3845:25: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] This changes all six of the ixp4xx specific I/O read functions to return the same types that we have in the normal asm/io.h, to avoid the warnings. Signed-off-by: Arnd Bergmann diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index b02439019963..7a0c13bf4269 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h @@ -143,7 +143,7 @@ static inline void __indirect_writesl(volatile void __iomem *bus_addr, writel(*vaddr++, bus_addr); } -static inline unsigned char __indirect_readb(const volatile void __iomem *p) +static inline u8 __indirect_readb(const volatile void __iomem *p) { u32 addr = (u32)p; u32 n, byte_enables, data; @@ -166,7 +166,7 @@ static inline void __indirect_readsb(const volatile void __iomem *bus_addr, *vaddr++ = readb(bus_addr); } -static inline unsigned short __indirect_readw(const volatile void __iomem *p) +static inline u16 __indirect_readw(const volatile void __iomem *p) { u32 addr = (u32)p; u32 n, byte_enables, data; @@ -189,7 +189,7 @@ static inline void __indirect_readsw(const volatile void __iomem *bus_addr, *vaddr++ = readw(bus_addr); } -static inline unsigned long __indirect_readl(const volatile void __iomem *p) +static inline u32 __indirect_readl(const volatile void __iomem *p) { u32 addr = (__force u32)p; u32 data; @@ -350,7 +350,7 @@ static inline void insl(u32 io_addr, void *p, u32 count) ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) #define ioread8(p) ioread8(p) -static inline unsigned int ioread8(const void __iomem *addr) +static inline u8 ioread8(const void __iomem *addr) { unsigned long port = (unsigned long __force)addr; if (__is_io_address(port)) @@ -378,7 +378,7 @@ static inline void ioread8_rep(const void __iomem *addr, void *vaddr, u32 count) } #define ioread16(p) ioread16(p) -static inline unsigned int ioread16(const void __iomem *addr) +static inline u16 ioread16(const void __iomem *addr) { unsigned long port = (unsigned long __force)addr; if (__is_io_address(port)) @@ -407,7 +407,7 @@ static inline void ioread16_rep(const void __iomem *addr, void *vaddr, } #define ioread32(p) ioread32(p) -static inline unsigned int ioread32(const void __iomem *addr) +static inline u32 ioread32(const void __iomem *addr) { unsigned long port = (unsigned long __force)addr; if (__is_io_address(port))