Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4371205imw; Tue, 19 Jul 2022 05:31:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vQdG64W+MWsRui2HKjVqOt/MmzckDCRYpU8tu2YppH80WKCv54ZxeR4w4Kr+ishvr6vC+p X-Received: by 2002:a54:481a:0:b0:33a:557e:9d6f with SMTP id j26-20020a54481a000000b0033a557e9d6fmr9359652oij.194.1658233910516; Tue, 19 Jul 2022 05:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658233910; cv=none; d=google.com; s=arc-20160816; b=v0zNjYTMQpxruyvyX527CKGX70CDEVzzFALc7QABTcIwZdhm6pTLfTB7HQu2hICLcu O9nSnwxtWzf1+gMOf1xSPSHrEIkFC8lqG6ScWBs88tn1MnnaluEaZu/1PHOrbKbhfWRc It1R+ntxrzH8qxAC1r/eKqYTmwTJHFAD3O++aNoTzXfj5gJDGHw1da0IvBxPBloc9swG Q6zNnm09QDMwfUXEzcqTyL7leQh63ONIDllpZCuYZtshzECYQlP0twLkjh3YjoFH0s1b svHSGmbngVFcAXIk7wxaP1+aSFoAGMsy/j5FwaDrGLcM0R9WEvfIqiFbsU+/Dtc0Pd4r /6Tg== 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=Z3Zk7v9oL5qjiQ1D0DlCpml/w/G8hoszbvxxKvRuLfGTQ9n2uGPY0dHM0szcpSoqdu P/o3t/yYWR5Xe1a4Z9NpdaUw7kmda2Xx60zP4rtsFfdql8MtQHVYhvBhrtJykotwXYzk +DU2F0mmMU3bOmbV1SxaG1Vf2TXeAXSkNN6+kM3xZfweRSVnqUulGD3zvxhInS5Bger7 GfDVehhkA5OlLezgnsr3vK9E8WBEn2KWf49JlY9DcCdX3VYozfcRQx6iXU/duZq6GOwo c2wrLU/UgisRGyHiNmZuMzFkq5nNsHFqKZ5NROl+rDsGft2lGo1WHMTCzkpc+PFLDCIa jJ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yOFcmJ2d; 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 fw11-20020a056870080b00b001019f713e06si14279090oab.179.2022.07.19.05.31.37; Tue, 19 Jul 2022 05:31:50 -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=yOFcmJ2d; 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 S237459AbiGSMWB (ORCPT + 99 others); Tue, 19 Jul 2022 08:22:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237332AbiGSMUf (ORCPT ); Tue, 19 Jul 2022 08:20:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9584A5A466; Tue, 19 Jul 2022 05:07:41 -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 878F36177D; Tue, 19 Jul 2022 12:07:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52C20C341C6; Tue, 19 Jul 2022 12:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232443; bh=YiegBnLb7fzcdAG/9lSyNYztOpy0PPrHib+C+dJG+4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yOFcmJ2dtx6x8FTEMRhLLP728O26LaMOfs5USkJ80IdQRqGrf2TkgRF5OHj/V3vED aBaXbfeXkKF1IZy4bNjobpvoIe230whQ4nRlc2fWSze/9BX2uUx/jCI3qfhW4IH175 Qecb6T00qWnQ4dsi5VMfR+yMgToU7IXWq8wRKBJA= 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.10 022/112] sh: convert nommu io{re,un}map() to static inline functions Date: Tue, 19 Jul 2022 13:53:15 +0200 Message-Id: <20220719114628.141013569@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114626.156073229@linuxfoundation.org> References: <20220719114626.156073229@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