Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3407908rwa; Tue, 23 Aug 2022 04:23:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR4K0/dfVc0EGDN01JPuwzC68lwOnxzPTaHWAWR/BVSF4k3ZwX/kh166KH7Mk3scyENr/ZFz X-Received: by 2002:a63:5b10:0:b0:429:c287:7bfa with SMTP id p16-20020a635b10000000b00429c2877bfamr19510563pgb.347.1661253820400; Tue, 23 Aug 2022 04:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253820; cv=none; d=google.com; s=arc-20160816; b=V1KqqrP9gGv76XGC6XHHYr/660fzeham9lJaUZP6zeWktj47/YCvr6w90965QRW2QZ oe5RtjVa6+7f/yH9LgEJmnCk0iZPOcUryR0+d8wt8hy8PX6Fx7KAShFYsT775opDlEHA 6ovVJaW0uec2Mf2TI1hsvrX4tVEdKyLAPeoKXhuaxes05nibdRU56CG87Ky7MuZ7o2bQ dkr868ps7001PNO2/jndbx3cbZ9W04VrfMrHcINRG615d9ssPO9fXVtwZ3EjqjzugYBy sWVJ6w8Q5QSlGPTZmPOlY4gmN/FS9XHypngmYXmprzmQWfO+fcuO1YB6ZMA0/Hq0j3a5 06Lw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JFA2+7OhLbpKqljNpbjLadSAQODyHi81PA6yuPI3Cok=; b=zt2JrZvURlfLirJYwvHcAAyNMiRscqcscQyxiiJtpQ9JyvE6LKjt534/MXlbQ7i3aN xoLM7JgmMKZBJnfq3bHezC9NgI1G2Hk6v5fV3alpPPwbteV2xYHixPwUdEEk1bI3dDOf j02Fan02rd+ojPQ6gjZ+G21iKlDJy3skuTxT+MgYIez6K9Q9Im5k3Mfu6QxdkNhPH3AO duiDIq3D7G8q/8tSB/oshrgM23u+iO1RdkAeG78ujS+0Orr2iOYc3uUVE6EDiradxUfH wJGddyBhNi1fEJoC+Ah/AwLojQaOYtBDjTvps44AhnHCS12oe1apq8SBx3hOLcx/uQC/ YxpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KTMf51iG; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a056a00158c00b0053711e43bdcsi581996pfk.151.2022.08.23.04.23.28; Tue, 23 Aug 2022 04:23:40 -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=@linuxfoundation.org header.s=korg header.b=KTMf51iG; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354163AbiHWKY7 (ORCPT + 99 others); Tue, 23 Aug 2022 06:24:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353593AbiHWKLl (ORCPT ); Tue, 23 Aug 2022 06:11:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D89CE65F7; Tue, 23 Aug 2022 01:57:34 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 74B686153F; Tue, 23 Aug 2022 08:57:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76235C433C1; Tue, 23 Aug 2022 08:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245053; bh=TmwB1yyIO7hlQxEEZ3YP1Hse/khGDr1TusJ9UJG8jgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KTMf51iGUJCU2bvIojCIpMLr1HpwOlO7+27QxqAjlgkoBUPmD/mjvEatK0h8RGqRm uKGwdSzsuuKDYjH5XiOXJqDYrj2GmT9YPlSud8FsYUS1oiqKIvafTKc5AHFVkJP1Wg 8SXSF2qysVr68t3c3GN88zj47S8J3w369lvXZBDA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Stafford Horne , Sasha Levin Subject: [PATCH 5.15 199/244] openrisc: io: Define iounmap argument as volatile Date: Tue, 23 Aug 2022 10:25:58 +0200 Message-Id: <20220823080106.112053769@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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