Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp449523ybl; Tue, 7 Jan 2020 08:55:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyvDHg1NsIZm3QK9HHbafBOM3PKbh4enj0Z5i85OQxVGLWRawD1tYko0MmhN8UqXJNLNdeD X-Received: by 2002:aca:4106:: with SMTP id o6mr392355oia.173.1578416113882; Tue, 07 Jan 2020 08:55:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578416113; cv=none; d=google.com; s=arc-20160816; b=gp11/8h4wmo7iYvL12fNUGM8/m8fp7qEV0zbAzxeTkPS7IxxZqjIt1xcRgZznjaqfP tMMGE2JeaOnkLkYBuObJHNXseyGVZTOPmbYouop4KdreXNNvy3cCdgZo5wKdxTAyuhKx z3JDVVmRgJ8VcoEM3DED4ay3QfzuUR85DVPJqLbOpeUW1UzriAHA4u0NDc8F7ktuKf8U E0j2PS4Q8ZLbPzOkE7LCBxTGlpELtCbsaSV/LejPRKq6U4k0kqxRtI7zRcnMgGmEKbu1 SQKnJgzmZq6CaTqRe4HYJNSxxDAfFbEgJjS+g7HJGSe0TysnIdskzIpTwCj3/3GVWddb 5OSA== 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=98P2japITKvXoEGBa1BHDwsKsjjjRb42UE97jN6j27k=; b=Z9PCmtdK+5uCVj3TTNCVw+uUxvzTqjPeC+Sfx6++8WcMvi4TUrVwm6q5h2CPzTvTjk xrCCR2wQXlw1sFX80AOUeb+X2E6ukfQs6Btv8x9dgJpnNxOCkDwcAOUaiIXkVTyUMsPE pxJANqhyCHuu/wgJs+IElsVsdzSuezla8xBIlXa42Xvwp3Q2w949axaLzak6UGImuDeJ h5rklFkHGm1hE7Wpg4TGeyECsew1cHMQFQpAstJp4PZwDUesA3/2WhEwzIyTfaMwjsIH PuNLNq7aAnWdbNMpMKtfqZDdy6ZzhU3gSwIv29sBsDfbtUp3XHbq0Vcwix5xvGd0bpVX LWDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nPI0cC7r; 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 w81si245250oig.107.2020.01.07.08.55.03; Tue, 07 Jan 2020 08:55:13 -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=nPI0cC7r; 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 S1728640AbgAGQyd (ORCPT + 99 others); Tue, 7 Jan 2020 11:54:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:42024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728614AbgAGQyd (ORCPT ); Tue, 7 Jan 2020 11:54:33 -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 6B861214D8; Tue, 7 Jan 2020 16:54:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578416071; bh=kcx/rxr2RLwdfnh8NHNbRoC/CMRusZFBrn/JE86e3Ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nPI0cC7rOnafhOVC5bp7UTE2mQoTZDbOxMxBpCNT2a6rIVaeFzV7mtVVZ9F+98p+x Hk2gcfTOOvUk0qIzZk1BSRAhziD0R33MmnQ7l6nqXeVJ0q41DUIG7bmLWej2I0aWHz EJm+d+oMYMPHrJxueaaDZOqmBnz1RIpoH7U6LrGs= 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 05/13] powerpc: Constify ioreadX() iomem argument (as in generic implementation) Date: Tue, 7 Jan 2020 17:53:04 +0100 Message-Id: <1578415992-24054-8-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. Signed-off-by: Krzysztof Kozlowski --- arch/powerpc/kernel/iomap.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 5ac84efc6ede..de8da1c3496f 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c @@ -15,23 +15,23 @@ * Here comes the ppc64 implementation of the IOMAP * interfaces. */ -unsigned int ioread8(void __iomem *addr) +unsigned int ioread8(const void __iomem *addr) { return readb(addr); } -unsigned int ioread16(void __iomem *addr) +unsigned int ioread16(const void __iomem *addr) { return readw(addr); } -unsigned int ioread16be(void __iomem *addr) +unsigned int ioread16be(const void __iomem *addr) { return readw_be(addr); } -unsigned int ioread32(void __iomem *addr) +unsigned int ioread32(const void __iomem *addr) { return readl(addr); } -unsigned int ioread32be(void __iomem *addr) +unsigned int ioread32be(const void __iomem *addr) { return readl_be(addr); } @@ -41,27 +41,27 @@ EXPORT_SYMBOL(ioread16be); EXPORT_SYMBOL(ioread32); EXPORT_SYMBOL(ioread32be); #ifdef __powerpc64__ -u64 ioread64(void __iomem *addr) +u64 ioread64(const void __iomem *addr) { return readq(addr); } -u64 ioread64_lo_hi(void __iomem *addr) +u64 ioread64_lo_hi(const void __iomem *addr) { return readq(addr); } -u64 ioread64_hi_lo(void __iomem *addr) +u64 ioread64_hi_lo(const void __iomem *addr) { return readq(addr); } -u64 ioread64be(void __iomem *addr) +u64 ioread64be(const void __iomem *addr) { return readq_be(addr); } -u64 ioread64be_lo_hi(void __iomem *addr) +u64 ioread64be_lo_hi(const void __iomem *addr) { return readq_be(addr); } -u64 ioread64be_hi_lo(void __iomem *addr) +u64 ioread64be_hi_lo(const void __iomem *addr) { return readq_be(addr); } -- 2.7.4