Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3318973rwa; Tue, 23 Aug 2022 02:44:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR7IEYznpcyUw/dETjtoZQzAVHpzjSC7gVuCRrNot8weG5IgsgH/QQVYnfgSMuIWFbnoaHKZ X-Received: by 2002:a63:5f8e:0:b0:429:c286:4ef7 with SMTP id t136-20020a635f8e000000b00429c2864ef7mr19549826pgb.166.1661247862775; Tue, 23 Aug 2022 02:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661247862; cv=none; d=google.com; s=arc-20160816; b=C2tsuioYBW40WFlaQn/fzcc4HiYJtIZ3n05WjuJXnUyIeREg1GsyG9y/31iVbIFknK Upa3WQUlgL26iDYLl7hLRPsH16rVyb6af0tm3Y32oFLK7fgUNz0AolAicqxzEArCHpgM lm/uLyW1GyJ6H07v57slJJLGCjv99mU24giiUaXMJj/npheFUKqUJ4J8WsVccJ7fs48D 3tDA8yuDkXxJ/0OqCtmhBzM1PNy9pfzf5U5GyS6wBUR8xT2TfBmBQcDy7OV2LmxQF03e HklvdrFPtYrCRcPTkKFO1YiHVdGx/ekKLxmu5+bPa/fplNUOkld9fdnQbVKqRANAhbO5 tpiA== 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=DRzX8kl/AWdH8VL8v8SFyFiIZts3XwIG9AKH/k8B9MiqQM8FCCy0YPp0RsXnLZB/+U TAlB33DNuW0rXSQotmHti7cAKMKCItsG6+C0k3OkTpCsQSlsez7IkWca7AtUX2Chmfyx 7U7iF+mdqqBGdmumjdFFrCbWUxvZ7wY+Idg5kcgWUC92JGUvZnWDqGUZ45g7XFJ4vU93 5fBsfjQJdECMU0N1f8Hnsd7OnFaG4YDRNMOvov5Ke8rSOSEaSxtemNQ/C7NyB6ph5ZZt orIzhWUiiZrFtF/JBJIT9BjzRwclZLPBbx3sdyC0WCf6d7PIAO7EeSL1pFRSc9diQa8C cW9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KCBR+26x; 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 u7-20020a170902e5c700b0016d70bd3fd6si17117413plf.77.2022.08.23.02.44.11; Tue, 23 Aug 2022 02:44:22 -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=KCBR+26x; 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 S1346987AbiHWJSM (ORCPT + 99 others); Tue, 23 Aug 2022 05:18:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349401AbiHWJP4 (ORCPT ); Tue, 23 Aug 2022 05:15:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE4C16DAE5; Tue, 23 Aug 2022 01:32:19 -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 9E0D06123D; Tue, 23 Aug 2022 08:32:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A68F3C433D6; Tue, 23 Aug 2022 08:32:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243539; bh=TmwB1yyIO7hlQxEEZ3YP1Hse/khGDr1TusJ9UJG8jgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KCBR+26xAnyk1YQjv5JdDVTIM8F/AsaRGYO4ew1ReG/eACdxMRFZroWc66BvYZEHK IMdkI3peg283gi5yUW2KxU99pmy2EFXZ0+ha+QfqWFi6DWqeRkQGj7T0eenknJGwUR qva+cUYbmdcf8HTAF55pWfc/yEYubPs0PT1zWgdU= 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.19 309/365] openrisc: io: Define iounmap argument as volatile Date: Tue, 23 Aug 2022 10:03:30 +0200 Message-Id: <20220823080131.102623174@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@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