Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3142856ybi; Thu, 18 Jul 2019 21:52:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy50aPOB66gZf3sWyxP9/Vsdjr/9eW/NhJ6sDSHoMm2M1J2ngR/XGgvLM/LGIJVZPJvMfNv X-Received: by 2002:a17:90a:8d86:: with SMTP id d6mr55193255pjo.94.1563511934240; Thu, 18 Jul 2019 21:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563511934; cv=none; d=google.com; s=arc-20160816; b=wc3/iCeJ2ouFf6uskr+q5MU1GtPS8lSvkdVNoAZtsNHyt5ZwImvqB/cfWdPUSA+I1T qUHotpzrgJXClCraj1xaOTmma9R711AClZgVzWpQvUJ3jPMZhzkqAIX4dy/JT2NrYrQk a6Up8ik0HdMaVpNX4AxtAUG5JSR4muB3YvlELRt1qhkPB4KMnU/Mp5sZ1Wa6Yq+HqNji rhG0U2It4p157gurAhW+mHenk7ebEFfOzdvDRvV5pSrR1H4PtpC52zQ/cBgTYittodS0 QJhIhzcvZexb/wTQ0rjxl63jbnPmsv02U4IHEjcQEDv90XqNtdMIDjWKMbJ6SflDPG4u 3TSg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LiZPSuG1F4anydftE9L1M07LussqEmtbAf0yf8UvmgM=; b=KDOJQ0g4+9kbCHOK4jQ+i+06XabewyT/4jxu/MJUpUxKU8k8u5lgbUwTh6+SHgEYGb McdGiXQZ7lO9qnFT3fLla/GNbhD0mvnzq8zG844mT9hOWLMiuV6mgVOf8RRR+BDmGoAX mqWXTLQ2OUNxSHbRByOdaJvm4iN+wDbstqv+AvLD2FsEr5w/7avVML+0A0JPxsZOrgEJ vhp5juMyIYKA+j8limf2FTsjRWpA5dl6ydBvn4MzbaG7LA3aULgUtJoJvRAtGQg2+ce+ Oa2mNGNoEdzlhs1HGKhELhwrArBrqaMMCyuE6jRhHt5AfIGoSdV0SbOfEZf19BgKbPRf DtEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qD7XomS3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si1265802pll.257.2019.07.18.21.51.58; Thu, 18 Jul 2019 21:52:14 -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=qD7XomS3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729830AbfGSECH (ORCPT + 99 others); Fri, 19 Jul 2019 00:02:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:33658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728906AbfGSEBw (ORCPT ); Fri, 19 Jul 2019 00:01:52 -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 47CA321897; Fri, 19 Jul 2019 04:01:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508911; bh=K0GG2IuOpfdaRilolTBGAevqgH7EWAGqWYnh0hI0YHY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qD7XomS3y+lkehS9jDSpKAIf0EfAs482F1D+HjFk80RuStRy13uts98B6uqZbLUMX 8AXjmZ86n+Bh8EfwxWVixNcY7+vGjE4UZvdkV9nHWtA8lszuofOpeNFoA/1fTuvICw 7taqovTh9LM2ulQTPWHHHFXaCzBIHDBnPRIPk+VE= 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 5.2 154/171] sh: prevent warnings when using iounmap Date: Thu, 18 Jul 2019 23:56:25 -0400 Message-Id: <20190719035643.14300-154-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-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 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