From patchwork Fri Jul 21 20:47:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9857667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 64CDF601C0 for ; Fri, 21 Jul 2017 20:48:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5635F2864A for ; Fri, 21 Jul 2017 20:48:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 498BC28655; Fri, 21 Jul 2017 20:48:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6A1D22864A for ; Fri, 21 Jul 2017 20:48:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA5906E03B; Fri, 21 Jul 2017 20:48:06 +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.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id B95F66E03B for ; Fri, 21 Jul 2017 20:48:04 +0000 (UTC) Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0M0H6r-1dttgM2hwb-00uZ5o; Fri, 21 Jul 2017 22:47:55 +0200 From: Arnd Bergmann To: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , David Airlie , Kukjin Kim , Krzysztof Kozlowski Subject: [PATCH] drm: exynos: mark pm functions as __maybe_unused Date: Fri, 21 Jul 2017 22:47:18 +0200 Message-Id: <20170721204751.3370881-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:imKmkdSs8vuXAIB6ThRElpWUIS9GuMyNNMjckKf68O56a77gN5x /P+DnbO98vb6IKOSaaG312brrXZenlEuO0NKoYsYbefyKx1eenfVBWdct6GS0UT0wgzVKgZ lPRdgJSYoke52o6atopXshiJZtoS3UgB2ETJxY/FxDRxm03d0qZC1SU4dfaPvSD63ocnPSm 41st7X7dPOfBxjIGzMqNg== X-UI-Out-Filterresults: notjunk:1; V01:K0:eRtUwWOE49w=:/2e6X9935zrIal9pfJjIJt KHb+Z0fyK6y3JE8FI8jmGLTESNVh1TdILX5N40NVnYVwGM+eQhU/ahWRJYPyQa6Ityhkss/Dm pYKBAYr6jvIJ7OLCTZJaLq/mmPUlmK1KfeQFxWPx08NmsU4pn0b1O0WJmWKuS5fxanzJLoXk4 RJ4ucHLYMQ8H0sl/c0637tUunHhIhsEpNTpYfF+CCAd2EftYg7uZfdOCUORGHD47i8v2hxj6K YRRa6LIqx0At8C0uLLOFOtIWY0GKBYQFEBG0AmXX+9HyPF7LGwjy6Gcw0KJvL47zNn6N5/Swt j2Meolk1VRU37CTowDrM5kwncvzafLIyGQM4YyqSJU/F0/nTgt0p4NYLyKJGA+dnKYiTSnwGj i0/vdWP/U8TqF5OC+NobaKUNsnZistDFgtz62vB66FXsvuOm0K78yKoqfq0IdriURJBVbxwyk dByAtokrOXzx9Os2oa28b+5TkJ6Xv+YoH8gkZ8aDQRm/MRVGuj5CZt2UFFcWLrAtlVom2BUbr MmBfcjNT61iLFtFyRkBDUiMrGv4NycMgAFqD8Ir6hYYiO5obKQlK/CRbrcI0vHIA39L6CpOX5 bWIYl1H84FE9ep9cbkK0QZiuzVb0Kp9qd+iBz7NLbmTaMUD+uAnGHZZrPPsFePii+e6t8OvxH JtSFeaEWhJi3UWt2VePLPJKD4wJ+FFAfJ8ilt+1MUDdlHfTXZTvnDS9D63+xKSE2LJyAuZmaG zoWVhS5AMapuqK1GnPk9imTy+xFozlnuLv2y4Q== Cc: linux-samsung-soc@vger.kernel.org, Arnd Bergmann , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Laurent Pinchart , Milo Kim , 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-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. Link: https://patchwork.kernel.org/patch/8436281/ Fixes: 9be7e9898444 ("drm/exynos/hdmi: clock code re-factoring") Signed-off-by: Arnd Bergmann --- Sent originally in Feb 2016 without reply. Found the patch again in my backlog now, it's still needed. --- 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 06bfbe400cf1..02a00f1c6d5b 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)