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: 9857669 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 50969601C0 for ; Fri, 21 Jul 2017 20:48:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 433F828621 for ; Fri, 21 Jul 2017 20:48:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3704928655; Fri, 21 Jul 2017 20:48:31 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B515928621 for ; Fri, 21 Jul 2017 20:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753527AbdGUUs3 (ORCPT ); Fri, 21 Jul 2017 16:48:29 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:56689 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752048AbdGUUs2 (ORCPT ); Fri, 21 Jul 2017 16:48:28 -0400 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 Cc: Arnd Bergmann , Andrzej Hajda , Milo Kim , Daniel Vetter , Laurent Pinchart , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org 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== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.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. 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)