From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932927AbcERQIp (ORCPT ); Wed, 18 May 2016 12:08:45 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:56875 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932861AbcERQIg (ORCPT ); Wed, 18 May 2016 12:08:36 -0400 From: Arnd Bergmann To: David Airlie Cc: Arnd Bergmann , Russell King , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski , Matthias Brugger , Ben Skeggs , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, nouveau@lists.freedesktop.org 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) -- 2.7.0