Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3801229ybi; Mon, 29 Jul 2019 12:54:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkngU1UdM1Jt3mDSY79ZTp0RyY87XQtSlfXxOf3d/wJy1Idh4MWdGEvPg82zCdNc1zshxt X-Received: by 2002:a17:902:fa2:: with SMTP id 31mr113567504plz.38.1564430061566; Mon, 29 Jul 2019 12:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430061; cv=none; d=google.com; s=arc-20160816; b=TB5LfTpDSOpZCbE1ZX9I9o7HHJXxjW+2aLBky8JCXywfbMnJBNo+s8Qz/bz7hQwVQN 5FPNn0tH9rmT1xp4kuv+M6dGL9vLW5ygv0HBD/ghEVzzhthZUZzAF2Ifq5iwlcvkRgD9 65regMfXcPok8aHAPjzVBZEvk7IMSwuWrJjVCniyOvypnYXKmJPSqjYLsg/DRGEMw5wL Au3gE+tn8IfPGFiwHqFpZQ7Uo4z+r9NlCUsMzTe+UWrXoVummGII4O1woV1OaNRiEV4G jfkJTUy87k2bkex8S5pOqu/WAlceoiZcBOYADbXhPzLKg/L/9Rt+rexxcL/8xP29hnU6 XWTQ== 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=JGu+OyCA5JIRMoAGmw8tmewyIohuPrbLoDxypTt5Qzk=; b=lUGiOiABUoQkZLRQw0NkjmT2wzNMQcd0jx85B8+cKtVJu4OT1tBTjw/rmhP4JsrWWs Jx3IEyjUbKNMXNCMtomvqMmBWo77mo83W93goVeZT8hc0XJ5G7TjslKNCGt0WuDxCCey K1CE2SV++cRpjr5vbhGizyPrgx5/PXuDTPzuHlRlWF/pWL7UOZSv6fJgS5KWKsrsqccQ YeuazAIudXKrDsV9WLHnjTo4YgUtGrUiteYYqOf416JIrW4LtkTzGp5l/Z4xU58rmW4M DuHfHhSQ7ha68zXKLT9GU/lL3/aMaLkgS5qQVOGXeO7wHCzuo5sNWhEZP7oEZ3dywYxD BLEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WjyZfYzU; 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 y63si26544842pgd.403.2019.07.29.12.54.06; Mon, 29 Jul 2019 12:54:21 -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=WjyZfYzU; 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 S2390567AbfG2Twq (ORCPT + 99 others); Mon, 29 Jul 2019 15:52:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:44508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403920AbfG2Twj (ORCPT ); Mon, 29 Jul 2019 15:52:39 -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 04F7621655; Mon, 29 Jul 2019 19:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429958; bh=Jl3ktDhtDoytYpouuDYTsZkHQpDwAh/XYv9EgjJON4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WjyZfYzUDhONEVX8Mc1xkQ06hVCKYBfEJRHXJzxev7t7Ac3+TwLSa95agGyEdqoZH pCiUmdz1Q4EBybK+t0nj3c3Y1UK3ac33mLpHDV0T6t+di1lbrAmxuUfGXcpCWYH7Zw sxttMG3QFNvZZj5PZPwip0M2eRQYVoSlcQL49yy0= 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 5.2 149/215] sh: prevent warnings when using iounmap Date: Mon, 29 Jul 2019 21:22:25 +0200 Message-Id: <20190729190805.570775656@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@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 c28e37a344ad..ac0561960c52 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -369,7 +369,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