From patchwork Thu Jul 20 15:51:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 108397 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2308212qge; Thu, 20 Jul 2017 08:53:41 -0700 (PDT) X-Received: by 10.84.229.72 with SMTP id d8mr4933956pln.12.1500566021208; Thu, 20 Jul 2017 08:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500566021; cv=none; d=google.com; s=arc-20160816; b=lBR2a3x772BsIbAk+sGEpP0Lg+pFCke0lIVvcEyD0TU8AWO4ndtctnFqUFtWe7bf4P 9Fc67l0yVGdW9RUGZgJMZv7MygTGkQJBUhuD4fvdND/dAz7mIFVCzFoHK9WdkhwbVukO dohlaMIaYsJZDrgANZwt1dHHfpu1lnPIR1qqaHtU/1/7FZ6VP/57LQgP5TNCiprXBkMJ W38tKDWrD7TtmJmDtIhlOqqZBCfxgEiC3+gNu7lp808zrkp9OmxbglnHsDkB1b6eJMDb op92YvQiNVn2uob3Z9zpdHAhWBwXRYTQ1laD8LijfAZBvx/aDDbX1ESLWmWqNRSzi3Dz Y5qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=I10RoRFK3OkAH09u9qqnF2WuDvZU95GgPC/fU10lAgA=; b=pXkHRQW0GogBlSJhQZUhfI+ElAwsmHtCFe2tpQQFYh9rd5QqKrJS9sWyzNP78AoT0z qNt1+KWmkT9MXW+vgccdpaAr275It0eA8zA4zTGjtaJlCupuQyKUy1HVrsHo4gbbrKhX tbkQJC/QmrONaxUCwSeT7GlIWuI15PYvkCy4ujBIQFmdU6vMEKU5MXDd9RUlzYBhV8tk yXspYlYYndQbSf5Jqs5KV22/uUK7Fg10VSnG1mQLcWlu2pICe1BVU/jvTjTpyLSvMIx6 qZ7cqVnjCv8oAfDGC8zW1OeavO+2hkgOqjUTe+xi6Yqnm0loQXnVL7v16mtwDAOKrSsI cH0g== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o89si1749557pfk.208.2017.07.20.08.53.40; Thu, 20 Jul 2017 08:53:41 -0700 (PDT) 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 S965815AbdGTPxi (ORCPT + 25 others); Thu, 20 Jul 2017 11:53:38 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:51360 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934344AbdGTPxg (ORCPT ); Thu, 20 Jul 2017 11:53:36 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LfsQF-1dx8JJ0FER-00pd8S; Thu, 20 Jul 2017 17:53:34 +0200 From: Arnd Bergmann To: Imre Kaloz , Krzysztof Halasa , Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/12] ARM: ixp4xx: use normal prototype for {read, write}s{b, w, l} Date: Thu, 20 Jul 2017 17:51:47 +0200 Message-Id: <20170720155209.3250880-6-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170720154616.3250481-1-arnd@arndb.de> References: <20170720154616.3250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LRyDzSoo9Q== 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 Acked-by: Krzysztof Halasa --- Originally sent on Feb 2016, but it got lost --- arch/arm/mach-ixp4xx/include/mach/io.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) -- 2.9.0 diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 2f84c26a6758..844e8ac593e2 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); }