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: 8070841 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1E13ABEEE5 for ; Wed, 20 Jan 2016 10:39:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5392A2012B for ; Wed, 20 Jan 2016 10:39:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A051920437 for ; Wed, 20 Jan 2016 10:39:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC1036E8E5; Wed, 20 Jan 2016 02:39:44 -0800 (PST) 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.17.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 52BB26E8E5 for ; Wed, 20 Jan 2016 02:39:43 -0800 (PST) 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 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:cYTssC7swzM=:cc+FoSCboZvkOwRjy+xrcd 5su9T9xTbzB5LFRaopoQnv5RUQgwVafFdNnth6BFqvC/Jw9dNx8+Rfvx8ASHq/hNzoGfUaP5t Q+ddQ+dw1v6tuG/JivNcWXYJQdwawo/jWAqfw2/gWzCdWihpyzT9NwBrCzcmolJpiLMP3Reua 5MC4upFoEWRlpT/gSPfCDQfmcu0gujB5tnfAb92PaC031azYV7KYzqIrmCf3tmfYmqAATsi2b /VF+LQxr3pOqLnxISsey1Lhsw/6Vk9mb401CUNoxUC+DUqGn+L0/f/GWTrUxyCtMVpB/K+5XS lxezgEP0jgwFoyEKve//kXDVMtJSTmqFtHRC3lz+lyh2aogzbONMhbtAAOd5guVcjDJPaVJys oWjyc2lvmes2JcvzYN5hROvh7yCIq77glG+7EtrkRFo5OG5hSZ+lPr3yn2x3mA3+2aVboMQxS 8SS2kKj+n6v+PydEFIrISjRxB/FlhD3iRpBO4X5L1q8VIvD7xbm+bkEVoNAg0xnfatCm6B1JC NU2qUuaacu5qj0buPiftu3Yq8ed34lMawbNua4deYdczf5IWTPUXCM/fi4mCWT+PmAwAoyyNP DKSDF50VDWhoWPkggVsms1GFnHUxvoE/RJi5UWUDlffWyVq6iVPLwkpnHdq0/LFLLP621DMl+ Si0FPOspxce43ihao8MGBpvXK3LmM1QufRjIYXf8fNHRRwyES4Cpy9iwvEWWI0BLBn3eGJZMe nFwBI53jhpPiMuER Cc: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Seung-Woo Kim , linux-kernel@vger.kernel.org, Kyungmin Park , Kukjin 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)