Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp450335ybl; Tue, 7 Jan 2020 08:56:07 -0800 (PST) X-Google-Smtp-Source: APXvYqygW1AuX0H/+Xx4KFGjSNTYixgCKEebsiAEER/xM8tbAdAshSFZxqv/mg7FPPEzkRvfS1V7 X-Received: by 2002:a05:6830:1487:: with SMTP id s7mr646185otq.269.1578416167866; Tue, 07 Jan 2020 08:56:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578416167; cv=none; d=google.com; s=arc-20160816; b=ccpZuGUWzTaiT0jkY49zytaBgbrHJkv6DbBPSTEVyusRE078MorY0vg6zPREunC8n5 SYHzZ/l7vhwjnwjIHCLQaxGymCnw7DnHqli/5EREn6D9CS/8D+mfUbwIb//lUXN2ftCS g4HIGrPDIqWeUvPBXJtek7Jq6w3MC/MSucW2zCeLxXQpjm7CvH+QPrJIk+GlZMUsx8zu Kjvrag2mbCuEJB9QfEm9wANF/KwbYMgjK6JcGVUe6ap9WS92MKijP9ZA2NjAzsOl5avE K1pB9NGP7sYedJ0B9NjtXJn9Q2PEoOMqKbpwg6dw21d6fXzWf9dV9aOcKTM2BrmCsTf/ dAtg== 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=7WQyDs4lHTN3JTDpGvu7Sh/a9QffZamocy1jNIYJLlk=; b=rSRziYah/oQAHS77YG2SzPvyFHQjbUKQh/nEdJXE9ZPH+52OPYxX7f2RRqTT1487r3 h2UmYayipCerP/dxHLGv76FFZ8iqG+DWvn896vK85Mk60axFZfxyk2kDSm37JsH7LD2c C3C/9QgEQ9V0ql8vmi++WbgDXxHMEozGcaVgdSeKqpeRmCU3nc8XezExZierPBMsYe8h hYLpOIiQrb9qqa1IDsRv3szhmzzqQIBzpNRsR94uMhUor95OLhuyFrkdvW2yUTeJ+4w5 4BivNaqpu8krdWhxQYDC6jnVCO4Z10FpexPxs5calJN3omdl6gwd9VUze3VLPA066JFZ DKYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qNYZQFlB; 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 l7si181780oth.11.2020.01.07.08.55.57; Tue, 07 Jan 2020 08:56:07 -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=qNYZQFlB; 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 S1728739AbgAGQzT (ORCPT + 99 others); Tue, 7 Jan 2020 11:55:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:43496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728391AbgAGQzS (ORCPT ); Tue, 7 Jan 2020 11:55:18 -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 2D18324672; Tue, 7 Jan 2020 16:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578416117; bh=oXTZ8M1BBmTHLjjcFVmN9zcXDQy9s5Bq9l8BtwLstpc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qNYZQFlBu+SoU3ZIF8lpxeWmalSoh46HkqgMC/ZofikhUtazAC1EIawH/lJcnkWf4 WnToP3+0ja2JEKlI39yDsGBzuaCzhvg3Nga02GX4gM4dlTsXonHYjTtZ9zaHWF2rxn /UxwKagBv0pG9j4wvtUzG0LSzVLfKhGLWanGLoz8= 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 10/13] net: wireless: ath5k: Constify ioreadX() iomem argument (as in generic implementation) Date: Tue, 7 Jan 2020 17:53:09 +0100 Message-Id: <1578415992-24054-13-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 --- drivers/net/wireless/ath/ath5k/ahb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c index 2c9cec8b53d9..8bd01df369fb 100644 --- a/drivers/net/wireless/ath/ath5k/ahb.c +++ b/drivers/net/wireless/ath/ath5k/ahb.c @@ -138,18 +138,18 @@ static int ath_ahb_probe(struct platform_device *pdev) if (bcfg->devid >= AR5K_SREV_AR2315_R6) { /* Enable WMAC AHB arbitration */ - reg = ioread32((void __iomem *) AR5K_AR2315_AHB_ARB_CTL); + reg = ioread32((const void __iomem *) AR5K_AR2315_AHB_ARB_CTL); reg |= AR5K_AR2315_AHB_ARB_CTL_WLAN; iowrite32(reg, (void __iomem *) AR5K_AR2315_AHB_ARB_CTL); /* Enable global WMAC swapping */ - reg = ioread32((void __iomem *) AR5K_AR2315_BYTESWAP); + reg = ioread32((const void __iomem *) AR5K_AR2315_BYTESWAP); reg |= AR5K_AR2315_BYTESWAP_WMAC; iowrite32(reg, (void __iomem *) AR5K_AR2315_BYTESWAP); } else { /* Enable WMAC DMA access (assuming 5312 or 231x*/ /* TODO: check other platforms */ - reg = ioread32((void __iomem *) AR5K_AR5312_ENABLE); + reg = ioread32((const void __iomem *) AR5K_AR5312_ENABLE); if (to_platform_device(ah->dev)->id == 0) reg |= AR5K_AR5312_ENABLE_WLAN0; else @@ -202,12 +202,12 @@ static int ath_ahb_remove(struct platform_device *pdev) if (bcfg->devid >= AR5K_SREV_AR2315_R6) { /* Disable WMAC AHB arbitration */ - reg = ioread32((void __iomem *) AR5K_AR2315_AHB_ARB_CTL); + reg = ioread32((const void __iomem *) AR5K_AR2315_AHB_ARB_CTL); reg &= ~AR5K_AR2315_AHB_ARB_CTL_WLAN; iowrite32(reg, (void __iomem *) AR5K_AR2315_AHB_ARB_CTL); } else { /*Stop DMA access */ - reg = ioread32((void __iomem *) AR5K_AR5312_ENABLE); + reg = ioread32((const void __iomem *) AR5K_AR5312_ENABLE); if (to_platform_device(ah->dev)->id == 0) reg &= ~AR5K_AR5312_ENABLE_WLAN0; else -- 2.7.4