From patchwork Wed Feb 19 17:50:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11392229 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 9C4D992A for ; Wed, 19 Feb 2020 17:52:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B71524673 for ; Wed, 19 Feb 2020 17:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582134750; bh=9j4Wqmtnrm+aYUsHCZ4ooV/8lCGRX1ceFNDIpPGSnzM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lJDTRsKJnkytQdi52DWaFXXeFV5sBZpFORvGFunF+p4Z6sPt5fTcoZRmTDzfB+XIg arRWtabYW+Uw5zLpySneQ9ZZV3GC7LzdpUpdNOl9b31Q6NqgWOGEzBEOA9BGIYC1Z4 RJd6JLLlu31gEG/ctZzOjs227h1JVDgZeton14xI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726681AbgBSRwX (ORCPT ); Wed, 19 Feb 2020 12:52:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:51650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbgBSRwX (ORCPT ); Wed, 19 Feb 2020 12:52:23 -0500 Received: from localhost.localdomain (unknown [194.230.155.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9ECE124671; Wed, 19 Feb 2020 17:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582134742; bh=9j4Wqmtnrm+aYUsHCZ4ooV/8lCGRX1ceFNDIpPGSnzM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nm1WAez1jNKXLSvW7J07Tbu90KQFEkmZity4oGOnVRPXsXM+hDFW5K6Tinm5MRxB0 WmxFTCqql9bAOnA8rju+Ll6+AjyoFTRt2mVhrLGPAW7sOr9jTILaKYuFP5x34AJbfm vB/5/wk1OU7xGWOO0ZojgLGfdpGedlnCP90LLVcU= 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 , Geert Uytterhoeven , Andrew Morton , Thomas Gleixner , 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: [RESEND PATCH v2 7/9] drm/nouveau: Constify ioreadX() iomem argument (as in generic implementation) Date: Wed, 19 Feb 2020 18:50:05 +0100 Message-Id: <20200219175007.13627-8-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200219175007.13627-1-krzk@kernel.org> References: <20200219175007.13627-1-krzk@kernel.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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 --- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 1b62ccc57aef..d95bdd65dbca 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -613,7 +613,7 @@ nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index) mem += index; if (is_iomem) - return ioread32_native((void __force __iomem *)mem); + return ioread32_native((const void __force __iomem *)mem); else return *mem; }