From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C872FC76195 for ; Fri, 19 Jul 2019 04:17:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9DEBC2082F for ; Fri, 19 Jul 2019 04:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563509860; bh=fzSmJcAGmEYFtPIb7d9L7LHLf+7JukwywMtYfEC8msM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=sV8A8Deqvc1FvbAsvlXXW8fOdNyDP/AaiJaMzUU+Pu8QavfS2yLrqWNMg7AtT+dpN EdVKDVIM22KomEMA4XBgdc8d7GLerGCKxF9Q0VagVNO2FBHN0mlBErKj42+3o6CsRT d5LHrAi+3MGZwEKGLreNjoySjIZeTPgY/y46BF1w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389587AbfGSERj (ORCPT ); Fri, 19 Jul 2019 00:17:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:50398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389631AbfGSEOR (ORCPT ); Fri, 19 Jul 2019 00:14:17 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 97BB42082F; Fri, 19 Jul 2019 04:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563509656; bh=fzSmJcAGmEYFtPIb7d9L7LHLf+7JukwywMtYfEC8msM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WabAlNpQUDMqPVlvO95MQZjuNulBOzGsq8jah7YQd+b9b20gGLj2RrUX4MxA8ypkM kBh48jSSrCiK6M2y9gBrapW46FSI0gMGcMD6YZ0WzQ11yzthzBU2P1XlVA3gChxNUL XoYOxr7qI7cQ3RYCjh+fZ48Vxwof57RET0CFLckY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sam Ravnborg , Geert Uytterhoeven , Yoshinori Sato , Rich Felker , Will Deacon , Mark Brown , Inki Dae , Krzysztof Kozlowski , Andrew Morton , Linus Torvalds , Sasha Levin , linux-sh@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 41/45] sh: prevent warnings when using iounmap Date: Fri, 19 Jul 2019 00:13:00 -0400 Message-Id: <20190719041304.18849-41-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719041304.18849-1-sashal@kernel.org> References: <20190719041304.18849-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sam Ravnborg [ 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