Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1230768ybi; Fri, 2 Aug 2019 11:35:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpGCj7T2Tq1XxBxPe1JnlJFaGiATVwSHAQHa+7Fn1IKZJREHZUMTW0hhtG3eXxbfC5CqrS X-Received: by 2002:a62:be0c:: with SMTP id l12mr61484526pff.224.1564770905700; Fri, 02 Aug 2019 11:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564770905; cv=none; d=google.com; s=arc-20160816; b=qFRYpYe5qUxfuREYAjRaC0P6vBl9dcdkdB58HKGDtABgmg3dinwXT3oqqLJpZK9dVM 4eueb1sEcw1mYjYDNOP90c0Lemngc7Nxmc0GZ0mhABdgM6ybTPwwlxZR6eMcOxn0YU6j m+375+FSa6DSWf+h3GlHMMq08BMxas7Wj7/B5e4hmaRi2fWMzA4dACEXO6P/Pw45cj+u BC/yOKXRa+5Pii4dTf9CroZhtjB3hdPxWCsvQ9RazGOJyNu+kqAdqLaNFdTN+vbsExwB xmqEbrkjVb0CLEjIxgiIhV3RO3fUIsb+diP9CNzG9NZsC2Md3It13D0frUjLNZfWed6F UnQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JyfLIC0/VCJXqJNhaL5xjYWx592/34ce51bSDcJD2CQ=; b=N9D/RnOvsrSo7P/o3y4xavudghldb+bwPqpdE1LdMy2XcuNybD66SNdEU98ykiUyRx lvyIlDOQQY0REhzIB+lKBuqcsRpOofPys+PSRQUPpRfzaJBtbPQSMsAw21JJqhDxROmU uofR125VIS/B8Uure/Q4yVByQMYQVwLJQUywvJeLlcmZcyNeLDgmeOARd5nFD7vPAS9z yUPYS5Mw9aiw8Y0acJmfgLq9tp0bZSk5ScouULAJQ2/PtexutxR7ECOC07YuKRAGSBSL 7GANfrOx51xNYUfyK6Gl6g71GTX5Y7+FwcJBk/UXsdZOm2NQu0LqESwH3ziqHEYEP9Ek gmfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0b4C7qBp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si24001133pgp.405.2019.08.02.11.34.50; Fri, 02 Aug 2019 11:35:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0b4C7qBp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406060AbfHBJwm (ORCPT + 99 others); Fri, 2 Aug 2019 05:52:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:58274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406031AbfHBJwe (ORCPT ); Fri, 2 Aug 2019 05:52:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6AABC206A2; Fri, 2 Aug 2019 09:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564739553; bh=51dwQdeJ27vzn3osMTwYOUqm5QismICrmB7ZLxWYF00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0b4C7qBpjxTJhYQjqVwr3UekZUPz/ULaNbsxKDjuFqPECcJ3ZvLolupQXNB1ul+Wu EIyhNijXwHNd24yvXRuJHChwFDsIPxG+xl17ColP+vs8lD6o0UpQDQVDktq34g+QI1 TwLOSM14lxn/eSM8qNGXzIvWb+DKJumJb7rS5Uh0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sam Ravnborg , Geert Uytterhoeven , Yoshinori Sato , Rich Felker , Will Deacon , Mark Brown , Inki Dae , Krzysztof Kozlowski , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.9 196/223] sh: prevent warnings when using iounmap Date: Fri, 2 Aug 2019 11:37:01 +0200 Message-Id: <20190802092249.948469172@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092238.692035242@linuxfoundation.org> References: <20190802092238.692035242@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 733f0025f0fb43e382b84db0930ae502099b7e62 ] When building drm/exynos for sh, as part of an allmodconfig build, the following warning triggered: exynos7_drm_decon.c: In function `decon_remove': exynos7_drm_decon.c:769:24: warning: unused variable `ctx' struct decon_context *ctx = dev_get_drvdata(&pdev->dev); The ctx variable is only used as argument to iounmap(). In sh - allmodconfig CONFIG_MMU is not defined so it ended up in: \#define __iounmap(addr) do { } while (0) \#define iounmap __iounmap Fix the warning by introducing a static inline function for iounmap. This is similar to several other architectures. Link: http://lkml.kernel.org/r/20190622114208.24427-1-sam@ravnborg.org Signed-off-by: Sam Ravnborg Reviewed-by: Geert Uytterhoeven Cc: Yoshinori Sato Cc: Rich Felker Cc: Will Deacon Cc: Mark Brown Cc: Inki Dae Cc: Krzysztof Kozlowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- arch/sh/include/asm/io.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 3280a6bfa503..b2592c3864ad 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -370,7 +370,11 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; } #define ioremap_nocache ioremap #define ioremap_uc ioremap -#define iounmap __iounmap + +static inline void iounmap(void __iomem *addr) +{ + __iounmap(addr); +} /* * Convert a physical pointer to a virtual kernel pointer for /dev/mem -- 2.20.1