Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3793421ybi; Mon, 29 Jul 2019 12:44:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3FhQ6pY4aYgtNOK3IxZeQgEUz9yqyVqahlojsddXwcfVJG0MaUvW/w/c84IKjQcojQXic X-Received: by 2002:a63:f304:: with SMTP id l4mr104826276pgh.66.1564429474148; Mon, 29 Jul 2019 12:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429474; cv=none; d=google.com; s=arc-20160816; b=BUO9S6k5w2QUXq+5+e3II6AFrlvxrWSnY23gkK6KCfRGrc9mgIpfHcqW4b/xFexVBq QGyp7LWFvKuju18xUWsNuMUi9+AUc2+K74QpQJ7YfWMDFyyILhZbm93dR9DjM+293rTJ 5BPJBIq/X2qd8O2/7LqBdGYCmEg81Od+NJaeHCR3QDeAn+6/sbWxbwrpdjsUn2071zTH 4pAGaC5dLyH4oBqP/ZcxXBzuQi8ydo6ZP7JZfW+x6cBe20mYySI4UWvktn/fOPhRhwKn OaetoigTThQavHkPhyFetCgFnHD7f99VnK1vwoh9Ij+ScfUwZe190/hzXuqidbeT66Yv ReYQ== 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=IR/38c97BSMUsPJtjZxe53dIYiyelWxtYE8viLsFhHU=; b=PSMpQy027uKKGA7Ztky1vuZmHatzfmSWGVxDKYTyop8fXuWlRH7OQaYOXl57JkVWe4 n99dyLWbgw8DoyUoKf2iUQGVJr2Z57G6mL7JNvcHNaawdKbG9yoDrQ/HRLdqzU4EhbgP N/S/6bJk33lXy6xvAW1iS5LbBSoJJvrzVfXVp0NjAlBgPjHor4Tu762no4P96gDH/sUu +pkrnHrPwzMIfPx5cJi4DFx0TT455IpfBa99+idfsNk+vw3wAjtIFyNaz4WxRu0iWxPr Kf4kaYglmK2lIew9bqgEy7M6FcDajMdbIWA2x6tkXietoTKNQbFKzX6GvbGMIL0UkRK+ wuZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hMiuzRTF; 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 k72si31101326pge.95.2019.07.29.12.44.19; Mon, 29 Jul 2019 12:44:34 -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=hMiuzRTF; 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 S2389606AbfG2TnJ (ORCPT + 99 others); Mon, 29 Jul 2019 15:43:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:59248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389599AbfG2TnH (ORCPT ); Mon, 29 Jul 2019 15:43:07 -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 56A162054F; Mon, 29 Jul 2019 19:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429386; bh=L/0UbfsQuSYVVoqqmZY9l7Kzvao87zU9df+ydNE1jbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hMiuzRTFKK9Vw6fhgJgE5lJwmCRTQ8g2xAZYoUdGka5SCRMoVfmcmkEBeDmdxMOu0 DXxEN85mmbefebF3BFl2xQjonuJYR62HNRn/bCH1uzVwAAbAvLbXcSxNdodp+X2FB9 GbDro1b9WfSAKnh42/vDbX1JMnDWdUczkqkBU8lg= 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.19 082/113] sh: prevent warnings when using iounmap Date: Mon, 29 Jul 2019 21:22:49 +0200 Message-Id: <20190729190715.130329828@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190655.455345569@linuxfoundation.org> References: <20190729190655.455345569@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 98cb8c802b1a..0ae60d680000 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -371,7 +371,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