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: 108509 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1256265qge; Fri, 21 Jul 2017 13:48:08 -0700 (PDT) X-Received: by 10.98.93.21 with SMTP id r21mr8621835pfb.201.1500670088271; Fri, 21 Jul 2017 13:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500670088; cv=none; d=google.com; s=arc-20160816; b=UPDFU1Bw1hy/3wO3n7Z8XFGvyutHNVDzmcNgwp+8BeFQU6219p0I1monv68dYENcl9 wXFQ58Ac6qGaUhUOIcfXDnNYP+fhUzUYSfKW8U5qaYnoRDRGEh4iLb1VuwdvIy5qsF0u mrPEbCeYHrmQFSdqiJ1jWDv6CZrw3fRNmfbMraf0Wt5kdHp1R1Wz8Q5v4ZdNtyYdwduF Y1Qiv77UKbIdAGTgWbEAuTZJpxkI1Dv2AZov5otdWqYlAkDdsi8wkPMks0ECdK1vJKj1 /SH8yZw4Va4vBCHDDVxpmZjGRDu522wY+jzI7Xhb/N1VKgLyLOmvoklHq08ntOdMQ5cQ QfSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=2616dunOJv/9EEfbEWsh+YrsjYGwzHoUDgK7AwdkszQ=; b=hfFj2ix7t2QLIPwXRbwF57YKsvcW9SaapoIHvbURXE5tWTl7tc0ihMbIybcKO81SSo HpZrYsWbwmZy7tfKGAgZ68jFYwyRN/bjnWsysqMNLLQKBpEeGUO5kWapkOJcxnmYtdSf m+L3pkRUoDpyo9l6PIShxqW2C2HWE/6ZSI+NcwnaG394mE4zYuteH9iTbhICaoSJiZMi 8882ZDaZRgxWcink7dd/MELiaNfv9vaA0GvtrWiV/V/dacjnFXLC5DxIq12lz8GI7nC4 aw1myd1fOgFqO8LOTf65GHEb3Jm0cxHpu4MoPKMINKNX85Tu60qtUJxYeGbYV2dxp/fF nr6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id l33si1049391pld.868.2017.07.21.13.48.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jul 2017 13:48:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org 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" 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)