From patchwork Tue Jan 7 16:53:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11321291 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8816B1580 for ; Tue, 7 Jan 2020 16:54:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6728A2073D for ; Tue, 7 Jan 2020 16:54:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578416063; bh=mMrPdoW2NnN8sMcsihZhEQMDfMhuUP76fLnSnvAwL0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=r8ehgF9q5FgYW33eyaxtysZsb6ppHS3ecnZr9xTipr0cGqI8/5qzG4AMGQ4cc5MTx e3uTNc7AmkYs/2PqMsY2I85umVQ2KMl8sYfZY43L8p+LYI1hA585V8V+l0MGikF+16 owTQxMIwvDr2w1YKM/84+4bEhTho/h+U5Thpx8WY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728578AbgAGQyR (ORCPT ); Tue, 7 Jan 2020 11:54:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:41466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728211AbgAGQyQ (ORCPT ); Tue, 7 Jan 2020 11:54:16 -0500 Received: from PC-kkoz.proceq.com (unknown [213.160.61.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9EA3D2073D; Tue, 7 Jan 2020 16:54:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578416055; bh=mMrPdoW2NnN8sMcsihZhEQMDfMhuUP76fLnSnvAwL0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=odHfTW+8cECxrYMq2Vzsa1+MKLAZiRwwPcHqMedegEH2ouS5fNOOsZosd+u7hLcZ4 QNKLbLmuuOjhzd/v960g/wOhOG2WSBDznaoWxDMCOcpWJ/yDVkCRCTto4GhoN7BX6h 5kN4DEtsp6J8/QPmZeuorAYXPtPAgJBp4d4jOups= From: Krzysztof Kozlowski To: Richard Henderson , Ivan Kokshaysky , Matt Turner , Alexey Brodkin , Vineet Gupta , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Yoshinori Sato , Rich Felker , Dave Airlie , David Airlie , Daniel Vetter , Ben Skeggs , Mauro Carvalho Chehab , Jiri Slaby , Nick Kossifidis , Luis Chamberlain , Kalle Valo , "David S. Miller" , Dave Jiang , Jon Mason , Allen Hubbe , "Michael S. Tsirkin" , Jason Wang , Arnd Bergmann , Andrew Morton , Thomas Gleixner , Geert Uytterhoeven , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-media@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-ntb@googlegroups.com, virtualization@lists.linux-foundation.org, linux-arch@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT 03/13] sh: Constify ioreadX() iomem argument (as in generic implementation) Date: Tue, 7 Jan 2020 17:53:02 +0100 Message-Id: <1578415992-24054-6-git-send-email-krzk@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578415992-24054-1-git-send-email-krzk@kernel.org> References: <1578415992-24054-1-git-send-email-krzk@kernel.org> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among architectures. Signed-off-by: Krzysztof Kozlowski --- arch/sh/kernel/iomap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/sh/kernel/iomap.c b/arch/sh/kernel/iomap.c index ef9e2c97cbb7..bd5e212c6ea6 100644 --- a/arch/sh/kernel/iomap.c +++ b/arch/sh/kernel/iomap.c @@ -8,31 +8,31 @@ #include #include -unsigned int ioread8(void __iomem *addr) +unsigned int ioread8(const void __iomem *addr) { return readb(addr); } EXPORT_SYMBOL(ioread8); -unsigned int ioread16(void __iomem *addr) +unsigned int ioread16(const void __iomem *addr) { return readw(addr); } EXPORT_SYMBOL(ioread16); -unsigned int ioread16be(void __iomem *addr) +unsigned int ioread16be(const void __iomem *addr) { return be16_to_cpu(__raw_readw(addr)); } EXPORT_SYMBOL(ioread16be); -unsigned int ioread32(void __iomem *addr) +unsigned int ioread32(const void __iomem *addr) { return readl(addr); } EXPORT_SYMBOL(ioread32); -unsigned int ioread32be(void __iomem *addr) +unsigned int ioread32be(const void __iomem *addr) { return be32_to_cpu(__raw_readl(addr)); }