Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1646762rwb; Sun, 14 Aug 2022 08:39:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR6pFtmoZ19L3btwg+OhF7EX5SJRJ8WjVQO+C7P5CWs/PbcgeIbeLgLP9sqqgrJ3filbJskh X-Received: by 2002:a17:906:9c82:b0:6df:c5f0:d456 with SMTP id fj2-20020a1709069c8200b006dfc5f0d456mr8425305ejc.287.1660491581147; Sun, 14 Aug 2022 08:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660491581; cv=none; d=google.com; s=arc-20160816; b=A5+OJavUsBTklWn0ajaTY7WoLUGu/e0IEfw2saJiE6dYA7ZD+G762XDUslQx0KgCt+ Yq1HMROw08qH10/GQuUWscCETc2g9CLApx/Q2yZcXERBabx6ZZkmT50g59e2IfMBRA30 xu5tAsdCjhoUj0AUGPS9J85GqOgPN87S6AHgrbYIhnRcl8C1abuFfksGphUsXPbszwGM lagikdPTjnPKCP47yepLYhQ66XJn+Mp7Pr92BZVAaASTKSQlBEXaz1KqhEk8U2Fkx6jO H9MJI66yjZQhgwZP+jYDwYp7xUtanS6sRgASMrLXGqc/JyXlM39n+TbeK4JUrp2SE0dm LLoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JFA2+7OhLbpKqljNpbjLadSAQODyHi81PA6yuPI3Cok=; b=omrj3Skrjb7L2cWyJqArH79zIf62saj9e1iSohOZdmmshMGyZQP5SkcXvokyUOMaU9 ieYF6r7ZTy+bygMl24PfOmo0DIyvz1l+m4PqrLXMd/McLfgOUadGp2n/0lMGzCa41tSh bYfyyWo+eJwDJJ2dh++1KCrft3yS+4qiWIs6zKZ2+OpRPB27+6M1fqW0Muqn//6bJDNs fKJ+9ff3CtbA8HHGTj8y/8wNMxd9Bx6b2/uyeOSpHsfJlOtutZTfRzwIdJIUbZGMaThr Tn3KccxEVY3DpCF9F05IRSqQ/nZaHmnC6u/Y/toOFOReWt/YZLNZa+77yyr5aArMTb7z lBQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AClHnpxE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10-20020a056402090a00b0043d9ec0eb4fsi6925047edz.16.2022.08.14.08.39.15; Sun, 14 Aug 2022 08:39:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AClHnpxE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S240559AbiHNPd5 (ORCPT + 99 others); Sun, 14 Aug 2022 11:33:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240702AbiHNPd1 (ORCPT ); Sun, 14 Aug 2022 11:33:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC975FF2; Sun, 14 Aug 2022 08:30:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DCB4FB80B27; Sun, 14 Aug 2022 15:30:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D422AC433D7; Sun, 14 Aug 2022 15:30:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660491011; bh=TmwB1yyIO7hlQxEEZ3YP1Hse/khGDr1TusJ9UJG8jgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AClHnpxETW7doCkoaOlshndODXSaqAYcC+SEfS04/CNg2VebkbcVYTmEpB6bQtJFR RpCxs/2iZ6WuUU/pk2lZXda+35I/JyEbixMKNT9Adt6OnT0XffNC0pldXzeg1q0wgm BDkRQAIwa8pphD5aCFcizf4UeFwnyq3Yhhc2b0aoA75H9Oj8lbtivx2y3KHScavWZr N8d8FF6oNZ8Yw/WApEoJC5jJQsKUSL6OdN3r7OmuRBKaG0fA7BgubSSn1YAdel3XUN L712S0tJE0y8pRchU35NX+797xnaeeNtBC6fpzXyk4NzTf6hCDzTxA1C/Jyc0KoiOG sLHBcO53/LrLQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Stafford Horne , Guenter Roeck , Sasha Levin , jonas@southpole.se, stefan.kristiansson@saunalahti.fi, openrisc@lists.librecores.org Subject: [PATCH AUTOSEL 5.19 56/64] openrisc: io: Define iounmap argument as volatile Date: Sun, 14 Aug 2022 11:24:29 -0400 Message-Id: <20220814152437.2374207-56-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220814152437.2374207-1-sashal@kernel.org> References: <20220814152437.2374207-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stafford Horne [ Upstream commit 52e0ea900202d23843daee8f7089817e81dd3dd7 ] When OpenRISC enables PCI it allows for more drivers to be compiled resulting in exposing the following with -Werror. drivers/video/fbdev/riva/fbdev.c: In function 'rivafb_probe': drivers/video/fbdev/riva/fbdev.c:2062:42: error: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type drivers/video/fbdev/nvidia/nvidia.c: In function 'nvidiafb_probe': drivers/video/fbdev/nvidia/nvidia.c:1414:20: error: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type drivers/scsi/aic7xxx/aic7xxx_osm.c: In function 'ahc_platform_free': drivers/scsi/aic7xxx/aic7xxx_osm.c:1231:41: error: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type Most architectures define the iounmap argument to be volatile. To fix this issue we do the same for OpenRISC. This patch must go before PCI is enabled on OpenRISC to avoid any compile failures. Link: https://lore.kernel.org/lkml/20220729033728.GA2195022@roeck-us.net/ Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Stafford Horne Signed-off-by: Sasha Levin --- arch/openrisc/include/asm/io.h | 2 +- arch/openrisc/mm/ioremap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/include/asm/io.h b/arch/openrisc/include/asm/io.h index c298061c70a7..8aa3e78181e9 100644 --- a/arch/openrisc/include/asm/io.h +++ b/arch/openrisc/include/asm/io.h @@ -31,7 +31,7 @@ void __iomem *ioremap(phys_addr_t offset, unsigned long size); #define iounmap iounmap -extern void iounmap(void __iomem *addr); +extern void iounmap(volatile void __iomem *addr); #include diff --git a/arch/openrisc/mm/ioremap.c b/arch/openrisc/mm/ioremap.c index daae13a76743..8ec0dafecf25 100644 --- a/arch/openrisc/mm/ioremap.c +++ b/arch/openrisc/mm/ioremap.c @@ -77,7 +77,7 @@ void __iomem *__ref ioremap(phys_addr_t addr, unsigned long size) } EXPORT_SYMBOL(ioremap); -void iounmap(void __iomem *addr) +void iounmap(volatile void __iomem *addr) { /* If the page is from the fixmap pool then we just clear out * the fixmap mapping. -- 2.35.1