From patchwork Wed Jan 20 10:33:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101155 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3091055lbb; Wed, 20 Jan 2016 02:34:28 -0800 (PST) X-Received: by 10.66.141.109 with SMTP id rn13mr50618217pab.83.1453286068118; Wed, 20 Jan 2016 02:34:28 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kw9si14632995pab.63.2016.01.20.02.34.27; Wed, 20 Jan 2016 02:34:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935131AbcATKe0 (ORCPT + 29 others); Wed, 20 Jan 2016 05:34:26 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:64168 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934951AbcATKeS (ORCPT ); Wed, 20 Jan 2016 05:34:18 -0500 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0LjrTN-1ZkJTR3Ynx-00bvgz; Wed, 20 Jan 2016 11:33:41 +0100 From: Arnd Bergmann To: David Airlie , dri-devel@lists.freedesktop.org Cc: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: exynos: make PM functions as __maybe_unused Date: Wed, 20 Jan 2016 11:33:37 +0100 Message-ID: <12427702.1DA55iFFLW@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:5PKf6Xp9r0JIZeWgWf4e4dtYCLKHgjFIij0gZptIWsx4iPNgLke GPjugx5IFPD1ywoJcDSxTShmmH+0d+Rj2EgGoPEDSO73naqL1nw7np1hdGPC0le5hOxEL87 LoTw6T2V+W3ndTVCSskAqaW5T+s7N4Ayh3m+FWkiH5q3gKPp8g+/J51EEW1pfHKaILXZBbt ENkOATaolTJ5tqjYjDmlA== X-UI-Out-Filterresults: notjunk:1; V01:K0:AZKu9yhS8Bg=:04aWcTeZ0k2DvD74zUE/9t EDRVCJsHbsrADZOOyMkyg6JVXHbUmTgz5/3Eetb+hIx/OCeL1dRTrbKpMh3PLlG0Z/KFDQ4O7 RLHhTsJRNSci4OUa0fR8dpIP/b4Ze7w7w719FyGt6FU9fp0pVfSJ6dS9VRMBx0VVdiypWIG+m dMW9Pr9rRCYNaPWFxqGolvocgqMfmgH5oUkF8aQWdo10sHWEDqFjIWzDpUDvckV/Rbs+r77YX 1LiiG+TOg2hdlBGnE25enFTv3R5iZdazv92bW2epEfwhVI8qWCouYEY2OfUgS+8Hs5esbjOhh AQm4lRmKz0Rb3CnzWi5V5hzEBIA4OnpM1q0TRGpcBZZGRzg2lEbm2cryHvfBwMTz6TfzLXySB 9ZTYQmcREDNahqFzgkVvpMA85t1QhARQCywZL+LDB2H214xqSO9+OHddmkqCCINIdv+Vicn0G 6YnBo5TdsBC/SvtfDTth+I2+/HIaHJyV7XHQPSMh3CZwGa19kICzkHcmpimPDAjsUEkD79DAG +5MyPAe463bBMLCnohmPoniJsaV8wUWBHxgVel/dgz94q2z+nCcMgSCJlILuOP9cnqUYHv0le JUKMMyOCEl0DZVxYYcWeCPFSG5b/W3czM0tczIpUKexu/fmqU9E5P/m7xAFV2qcQf8CVwQVSh xxs/n4uoktSmQD0jXNWrZDiK6kwsvL3kRXU0ZrOr03tvQhMG+DYWwu5hTOsMbMTpILqN5hZJy AgeIBGzt06d8v2UY Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly added runtime-pm support for exynos-drm encloses the pm functions in an #ifdef, but not the functions that are called from them and nowhere else, which produces warnings: drm/exynos/exynos_drm_dsi.c:733:13: warning: 'exynos_dsi_disable_clock' defined but not used [-Wunused-function] static void exynos_dsi_disable_clock(struct exynos_dsi *dsi) ^ drm/exynos/exynos_drm_dsi.c:1291:13: warning: 'exynos_dsi_disable_irq' defined but not used [-Wunused-function] static void exynos_dsi_disable_irq(struct exynos_dsi *dsi) ^ This removes the #ifdef and instead marks the functions as __maybe_unused, so gcc can silently discard them and all called functions when CONFIG_PM is disabled. Signed-off-by: Arnd Bergmann Fixes: ba6e47795d83 ("drm/exynos: dsi: add runtime pm support") --- This is a regression against 4.4, found on ARM randconfig testing diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index d84a498ef099..e977a81af2e6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1906,8 +1906,7 @@ static int exynos_dsi_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int exynos_dsi_suspend(struct device *dev) +static int __maybe_unused exynos_dsi_suspend(struct device *dev) { struct drm_encoder *encoder = dev_get_drvdata(dev); struct exynos_dsi *dsi = encoder_to_dsi(encoder); @@ -1938,7 +1937,7 @@ static int exynos_dsi_suspend(struct device *dev) return 0; } -static int exynos_dsi_resume(struct device *dev) +static int __maybe_unused exynos_dsi_resume(struct device *dev) { struct drm_encoder *encoder = dev_get_drvdata(dev); struct exynos_dsi *dsi = encoder_to_dsi(encoder); @@ -1972,7 +1971,6 @@ err_clk: return ret; } -#endif static const struct dev_pm_ops exynos_dsi_pm_ops = { SET_RUNTIME_PM_OPS(exynos_dsi_suspend, exynos_dsi_resume, NULL)