Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp448979ybl; Tue, 7 Jan 2020 08:54:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyhugvPVmU20yu8034qKOYyTLw1PBv2cTqwCpH9xgmsKEvliNuyENXQiLSFJoBjNPVWppRK X-Received: by 2002:a9d:750b:: with SMTP id r11mr706443otk.209.1578416074704; Tue, 07 Jan 2020 08:54:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578416074; cv=none; d=google.com; s=arc-20160816; b=w+IR2wx/hG1X/SY/KA/8oT25F7YIvO5L3t+NvxRkDCLMXwfgK6s15pCTgdlfA0nMYZ VVAGIIdYAnt8X/haU/se2+08ZSOeKy6DRQtuE0ovXxy05BqTTIM/nTeLu1Tdf2xEV8W3 lHMCRM7RH086wP7sYvRzrGWlpFVsPvZHXQldXBRL4rZwsnAyY+fjfwaJID0fNpAjBmdJ 5g9L6xOzjgsBulxuqF800tOL091hSk209W+DoQQCk9lzkSOg4pg/vlvNvcL4PoPuBG2K SVInmXWV8nywxC/4fO5wYlNojxNScXzqTFa11IGl3K5D+gjA57FHWxJ7vk9VxLNzyixD 9jsg== 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:dkim-signature; bh=ar0JumDZ4e2toLdLQzDgHHDp6FtX8DaXVopdtfxwLoE=; b=VpWKCm/scLjkxbVA/KS/A2DXc7EnlEYaVFXb5dp6UHO4rxRKsp6lmvf1h157iK0/Di lRLbtWqt3KEXdQaKO1+xat/X2e7lUhDbBa+lCgQNV0lAX+hnKUVec+ftl9EfboiCzxcE 6bfDo2W52yFIolGfz8LOP2dNTWKc0fh/WE04PjAGss7kjU22u+lzjHDcFl+6J6DxMoGc 18Qs1Of95jFIAvRFRcRMODkR6bBbc5fVxqGynsBwNx8mfXESJkKo5YXkDOAcYB1smIXw zxqEeWcI79OEkZ4q6C0obUIdY8LXv1WIIfdGBq/FcwSxxt6cZvsmpHH4FC6QLi7sA90s mOoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Gq3wyr2N; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si159819oth.175.2020.01.07.08.54.24; Tue, 07 Jan 2020 08:54:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Gq3wyr2N; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728541AbgAGQx7 (ORCPT + 99 others); Tue, 7 Jan 2020 11:53:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:40876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728384AbgAGQx6 (ORCPT ); Tue, 7 Jan 2020 11:53:58 -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 E220F24676; Tue, 7 Jan 2020 16:53:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578416037; bh=2INYl/WHNT/C7GiSViCA3JtOV1QGzxyGNL6AjXT7Bk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gq3wyr2NgXEtKO+rZ9d3tlUDQp9mNuBH1xznjDTPdiazHUzQTTcuCslpJ4TO8EZn7 +R/czV2lgpqBaWY/CPIEd0znmynBhYmhbPvx0+xlduzJJwVMMP5AWcH6D3uGBFkDps 6C6+d1A7zhCNjUy72ijuDhrxWSGbGa5zQUNCUUOM= 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 02/13] sh: Constify ioreadX() iomem argument (as in generic implementation) Date: Tue, 7 Jan 2020 17:53:00 +0100 Message-Id: <1578415992-24054-4-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-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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. Suggested-by: Geert Uytterhoeven 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)); } -- 2.7.4