From patchwork Wed May 18 16:07:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9120781 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D700FBF29F for ; Wed, 18 May 2016 16:08:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 014DD2035D for ; Wed, 18 May 2016 16:08:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 23FA72022D for ; Wed, 18 May 2016 16:08:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BD076E882; Wed, 18 May 2016 16:08:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by gabe.freedesktop.org (Postfix) with ESMTPS id 54D086E87F; Wed, 18 May 2016 16:08:05 +0000 (UTC) Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0LZZIC-1bQ4ZE0pOG-00lV0r; Wed, 18 May 2016 18:07:48 +0200 From: Arnd Bergmann To: David Airlie Subject: [PATCH 4/5] drm: exynos: mark pm functions as __maybe_unused Date: Wed, 18 May 2016 18:07:32 +0200 Message-Id: <1463587653-3035181-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1463587653-3035181-1-git-send-email-arnd@arndb.de> References: <1463587653-3035181-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:hTYa47QQUJyH9lT2KMoVa9Pdmx2A09W4/HrPLX/40PjhD0iXQtk FC3Q1t8czUZI2yhF44bdWysJ8YBodIAgKz4GsEj03xAxjsoW4lUvQreHf/y+BAsG6v/TuMh xbFhW0McnWhw5he4JN9KmOqKlZgJeaYZNH8wUwNqdRMPGVJ3Bvj7u/nS3A60rtuQPNNeiVA mMvi+RKQwZELom2anCMvQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:ya/rO0pk0Hw=:80AWPpaRD+dlWNLONPtZ15 l5gTjIBl1FcH0VLgIUUMrHrIrOnUd0Caty9Oui07fDTB9CobgxHKEVW2guANcR/NcidzWocGX C0qI2InfqZVyxESzMxLfINFh/g66JlP3Fg/Mtyh+o4jJcdtqRckTZZlXHwAoR61+XcjfNaZ1J yG6+Mw2X5GgIISWjy6gXwCu102TUAuN0c9M4yKj0vvoywTcqjVQWzHvaQA7Up33MtHwi5MNhE gxgnWSaKuezI+Q6bWolJ9ev1UvXCOVg1Dk/5jdRC1vwJ3jsXWnA1/S9pK1TNXpqylBDnGMohc lkPFaK6j+hBKrtbweU8Q8az2ragEdkYyo/ucbyx3wYkZf36xx8+bv4CWo4j26GrbSKp9mISDY VkmCfPNKJpM2w730MmsmWa/xDGuHI72n+BCgT89POu8OtJVNAhQTGn/p65h9KkgKZ4MMJkWi2 zUZ/0OUc+u32PDqcc6jOT//k6FXNkRipq/NheDvzmhl7wGJdE9OA5B6TcBrVvTsnpp4Bc6uRN WXPpOfmpcS9wb1aZXA7aL9exG3NNQQqhr6Dhiya/ssL5S4wY7Vl2nCK26JXkhQSXH1IYV8ydj gI3bgF0YsLxv0Jp2w4miJMZqyw2a1jNpYXEpnJYL0pc7PC+XyIOn3BDB3GXe9R7nwy+xn+e01 qtmE6RzbLk3MxxlJxzB0Hx0ZD0/YIWJD/iZLDeGfFLUuzn0TenA688JExvqDhL5bGDZy17c6i n/M48lOTQTWDtXIT Cc: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Arnd Bergmann , nouveau@lists.freedesktop.org, Seung-Woo Kim , Russell King , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Alex Deucher , Kyungmin Park , Kukjin Kim , linux-mediatek@lists.infradead.org, Ben Skeggs , Matthias Brugger , =?UTF-8?q?Christian=20K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The rework of the exynos DRM clock handling introduced warnings for configurations that have CONFIG_PM disabled: drivers/gpu/drm/exynos/exynos_hdmi.c:736:13: error: 'hdmi_clk_disable_gates' defined but not used [-Werror=unused-function] static void hdmi_clk_disable_gates(struct hdmi_context *hdata) ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/exynos/exynos_hdmi.c:717:12: error: 'hdmi_clk_enable_gates' defined but not used [-Werror=unused-function] static int hdmi_clk_enable_gates(struct hdmi_context *hdata) The problem is that the PM functions themselves are inside of an #ifdef, but some functions they call are not. This patch removes the #ifdef and instead marks the PM functions as __maybe_unused, which is a more reliable way to get it right. Signed-off-by: Arnd Bergmann Fixes: 9be7e9898444 ("drm/exynos/hdmi: clock code re-factoring") --- drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 58de5a430508..ea4b2b7d7ad7 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1934,8 +1934,7 @@ static int hdmi_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int exynos_hdmi_suspend(struct device *dev) +static int __maybe_unused exynos_hdmi_suspend(struct device *dev) { struct hdmi_context *hdata = dev_get_drvdata(dev); @@ -1944,7 +1943,7 @@ static int exynos_hdmi_suspend(struct device *dev) return 0; } -static int exynos_hdmi_resume(struct device *dev) +static int __maybe_unused exynos_hdmi_resume(struct device *dev) { struct hdmi_context *hdata = dev_get_drvdata(dev); int ret; @@ -1955,7 +1954,6 @@ static int exynos_hdmi_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops exynos_hdmi_pm_ops = { SET_RUNTIME_PM_OPS(exynos_hdmi_suspend, exynos_hdmi_resume, NULL)