Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4446383imw; Tue, 19 Jul 2022 06:49:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tz2k95A+0ea4uUPS8uw029owTklBM73EpQuPjzt5PLBy6d0thLsZuyF8jFF4ollUg8HfwJ X-Received: by 2002:a05:6402:f10:b0:43a:b4cb:4d04 with SMTP id i16-20020a0564020f1000b0043ab4cb4d04mr45224438eda.305.1658238542435; Tue, 19 Jul 2022 06:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238542; cv=none; d=google.com; s=arc-20160816; b=Rw/AnCMPHJl370kLfVbesny9w3U/9kj62qdwqE1lqkxLSCb++W2ozWD6qeQTG4Xdn5 PlG7QrOxbr2260n1z6nCQQs99Jw0u+4Zu/wRdN/b/Ok+PLh/jMLUDUWRQpJ8q8NE6HIS klh8mBdMFzSJi1CRp70oLeWKO5vVIbW0Vn24aVXQgST4NWVgkhN3xkYwxWDsX3pq4dTr tvZvmJFZfykuWFrgtx2stLtHrmqTlyijFR+1/5vQ8dGce0YGtIqr7sLbiNFTyh4Z9aFo NbiLK5dlFeNgoanraE3Zfk+d5ix2WkiOmQnZF32aKV2KKhmgTQegDD05bkewht1K1Vsh 1Zgw== 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=WamhyqoCxNkewZHfhNUqEigx+vrPZEeyO+E+qB+Qk5w=; b=uVs6ttlohVSqTOGaJQbFCJ2Cb7IV2vq66vA/E4TG00GzgUYKi69at1P0dBkHt1N3RC bNWmaEcK7+2YKgVOTn1NlH1PngqLJBdSK5oALx6idUMG6EDU3Mm1PDbTHujF1JhmlbTL +9mXJy36+JSq4KRoPblppmsyRGDxlzMQUdZGmcLU0H3H/IGbKniYqrzHbmNbYW1s6t7g i+y1somejprTRaRZ2bGdDAHjTwNItUxkcIYbhaWsKZBzJYC44vjY96djEIy40IYghSYf D1gSTOWSRz919cSxrvJhh0wboVT6pF3xPSJlTJ/tpqTT5T2DYDBwEnIyOciUXQiINn3t gRYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vucm7Gu8; 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 di12-20020a170906730c00b00722e89ba02bsi21406038ejc.736.2022.07.19.06.48.37; Tue, 19 Jul 2022 06:49:02 -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=Vucm7Gu8; 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 S236561AbiGSMcr (ORCPT + 99 others); Tue, 19 Jul 2022 08:32:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240419AbiGSMcL (ORCPT ); Tue, 19 Jul 2022 08:32:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 389735288A; Tue, 19 Jul 2022 05:12:13 -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 D8586617D9; Tue, 19 Jul 2022 12:12:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA5D7C341C6; Tue, 19 Jul 2022 12:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232725; bh=YiegBnLb7fzcdAG/9lSyNYztOpy0PPrHib+C+dJG+4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vucm7Gu8PZLZSRoXLoMqGNWaaWhwoMLVsQrwbwEvQW6sjzkSihhsub+kC9yYVKs9R mlim0W0V11He1GU4w6WqANx9rUI/Sqvm2NNf3brveYDa8brfyby1Qw39i2aQZO1C4F IAYlnCehLAO5r/Ao1Bwanv/rnnqxksQdyYYznnsk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , kernel test robot , Jonathan Cameron , Christoph Hellwig , Andrew Morton Subject: [PATCH 5.15 024/167] sh: convert nommu io{re,un}map() to static inline functions Date: Tue, 19 Jul 2022 13:52:36 +0200 Message-Id: <20220719114659.090878190@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114656.750574879@linuxfoundation.org> References: <20220719114656.750574879@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 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 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: Geert Uytterhoeven commit d684e0a52d36f8939eda30a0f31ee235ee4ee741 upstream. Recently, nommu iounmap() was converted from a static inline function to a macro again, basically reverting commit 4580ba4ad2e6b8dd ("sh: Convert iounmap() macros to inline functions"). With -Werror, this leads to build failures like: drivers/iio/adc/xilinx-ams.c: In function `ams_iounmap_ps': drivers/iio/adc/xilinx-ams.c:1195:14: error: unused variable `ams' [-Werror=unused-variable] 1195 | struct ams *ams = data; | ^~~ Fix this by replacing the macros for ioremap() and iounmap() by static inline functions, based on . Link: https://lkml.kernel.org/r/8d1b1766260961799b04035e7bc39a7f59729f72.1655708312.git.geert+renesas@glider.be Fixes: 13f1fc870dd74713 ("sh: move the ioremap implementation out of line") Signed-off-by: Geert Uytterhoeven Reported-by: kernel test robot Reported-by: Jonathan Cameron Acked-by: Jonathan Cameron Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- arch/sh/include/asm/io.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -271,8 +271,12 @@ static inline void __iomem *ioremap_prot #endif /* CONFIG_HAVE_IOREMAP_PROT */ #else /* CONFIG_MMU */ -#define iounmap(addr) do { } while (0) -#define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) +static inline void __iomem *ioremap(phys_addr_t offset, size_t size) +{ + return (void __iomem *)(unsigned long)offset; +} + +static inline void iounmap(volatile void __iomem *addr) { } #endif /* CONFIG_MMU */ #define ioremap_uc ioremap