Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3814758ybi; Mon, 29 Jul 2019 13:09:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDN1UjIHPun3fZs50z8eONWr+LvBepPALVORtp2Wk10k5dVdZv6q0WCZ+Ll/EWGgWGVksU X-Received: by 2002:a17:90a:80c4:: with SMTP id k4mr115109583pjw.74.1564430958609; Mon, 29 Jul 2019 13:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430958; cv=none; d=google.com; s=arc-20160816; b=ttkl+Cosjgf14+QKqyNkFhjf6DlSHsbMNq3QPFZBobqLqWc7m/EY8yHktiRJ6I6kEE agPaj7CJim9ZMqmk7f7dUjL8ySePm2BIhvgRHmMU48kLxZZLDx4ubAOFLeSzd9pD0xFL 7rJPznG3f+fBfa6bIV7gvgllogkuc12SSNSXO7NznUpMYQtXAYmpewIcRYbwEAwxPSgl Onep5/FAgr9KRYwjqknLj9Qe1MoZjXnjXm1ToOraHH8x29ejn5Bt5petUY7KJ1slb+e+ 9HAp4/Q2gitxViW4ophPctkjTEqUYrKtb7yhhKdnQ93VJjJxega4O7aCBws+xXydlO+s +SeA== 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=aauY/diqCfMu4PfNUblEFV8ZlOV2b1HN1hdikMEGNafxQljpRULdP4ddjmF36ZYo00 t3SbN2BzUy3g6yD9VDF5ocs0YxujQL4F91z2TyT26EOLi1GpebmVLTAvoq9uCPR3JyOO 2LDSUt7yRDn9eJyNGgNCsAPVv/dz1NoM39EqmQ47lS3nlB2D2BWEDHhwkcfI/Trw2Tqn tYkH12Mk2xMCJKdJMUAqN0ILmbHD+yKS6/WAsg6hu/tTbkITYNt+p4BhTEnYxiL77qdl ggQq5lZgiC799B+f5DU3f2Zdmg67bpdaFpmAffgUEpl4kabpTg3MfFftKJJVbW5pjSM6 wYhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KeKUmZTN; 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 k98si24771727pje.41.2019.07.29.13.09.03; Mon, 29 Jul 2019 13:09:18 -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=KeKUmZTN; 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 S1730145AbfG2UHp (ORCPT + 99 others); Mon, 29 Jul 2019 16:07:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:53852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727931AbfG2Tiw (ORCPT ); Mon, 29 Jul 2019 15:38:52 -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 8901020C01; Mon, 29 Jul 2019 19:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429131; bh=L/0UbfsQuSYVVoqqmZY9l7Kzvao87zU9df+ydNE1jbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KeKUmZTNvF4Bfl+g4aORmKpyczI/anBCquqXVBAmBBZByExfzX4wq++vjuqfQN6T2 77zmsFFQtxKgUZ3JQikTa/IeoDl1kDPI5rd1swK8SSdIKUdJB3cYvUs7zVPokIm9nc ENUbPv+bLR14Rbz0/ddEfUr5lAQWODCg7R6jaI2U= 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.14 270/293] sh: prevent warnings when using iounmap Date: Mon, 29 Jul 2019 21:22:41 +0200 Message-Id: <20190729190845.034969861@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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