From nobody Tue Apr 7 01:54:21 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE8A7C433F5 for ; Mon, 10 Oct 2022 02:29:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbiJJC3B (ORCPT ); Sun, 9 Oct 2022 22:29:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbiJJC26 (ORCPT ); Sun, 9 Oct 2022 22:28:58 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 985822BE3F for ; Sun, 9 Oct 2022 19:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=bW00+3CNMe4I7RwtZMffKEyycBp1VFQ01aFjOTkzmCc=; b=TFadtXSx5e8TK+GkPBm3cRbAP/ QO5L999z2KcZ6BXBlH1ztfy2uR/T/zWT0H4HSXGPnCK2gHQXJyqHWCNhj6Y7+rIdQKEudS1ul8/yk vL3CMe0gXDHK7SvcjUEYc13a2/wGjmlDmUsL5F41knHs9mgtcrAd7eQe2v9q+EvFRVHbrK5Vx8Ofk Xen52aKkZQt2SvkTCkQ2KLOxE6gPbEYJR5ahggCliramY9Q1dpDW0ViiR3hZoERz6FE8/WrTq6uK2 nvggi/siXcFTO7d3pRPoMDkEqb2eUMwxSg37MsDAJSY07rhOfUvY3+q1awyRkFSuECK25JuGEMFK7 LLbKTP2g==; Received: from [2601:1c2:d80:3110::a2e7] (helo=casper.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohiXG-003sr6-Gg; Mon, 10 Oct 2022 02:28:54 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Vineet Gupta , linux-snps-arc@lists.infradead.org, Arnd Bergmann Subject: [PATCH v2] arc: iounmap() arg is volatile Date: Sun, 9 Oct 2022 19:28:46 -0700 Message-Id: <20221010022846.20101-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add 'volatile' to iounmap()'s argument to prevent build warnings. This make it the same as other major architectures. Placates these warnings: (12 such warnings) ../drivers/video/fbdev/riva/fbdev.c: In function 'rivafb_probe': ../drivers/video/fbdev/riva/fbdev.c:2067:42: error: passing argument 1 of '= iounmap' discards 'volatile' qualifier from pointer target type [-Werror=3D= discarded-qualifiers] 2067 | iounmap(default_par->riva.PRAMIN); Fixes: 1162b0701b14b ("ARC: I/O and DMA Mappings") Signed-off-by: Randy Dunlap Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Cc: Arnd Bergmann --- v2: add Arnd to Cc: list arch/arc/include/asm/io.h | 2 +- arch/arc/mm/ioremap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/arch/arc/include/asm/io.h +++ b/arch/arc/include/asm/io.h @@ -32,7 +32,7 @@ static inline void ioport_unmap(void __i { } =20 -extern void iounmap(const void __iomem *addr); +extern void iounmap(const volatile void __iomem *addr); =20 /* * io{read,write}{16,32}be() macros --- a/arch/arc/mm/ioremap.c +++ b/arch/arc/mm/ioremap.c @@ -94,7 +94,7 @@ void __iomem *ioremap_prot(phys_addr_t p EXPORT_SYMBOL(ioremap_prot); =20 =20 -void iounmap(const void __iomem *addr) +void iounmap(const volatile void __iomem *addr) { /* weird double cast to handle phys_addr_t > 32 bits */ if (arc_uncached_addr_space((phys_addr_t)(u32)addr))