From patchwork Fri Feb 26 11:55:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8436301 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 CBFD5C0553 for ; Fri, 26 Feb 2016 11:56:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0460820389 for ; Fri, 26 Feb 2016 11:56:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D67C20266 for ; Fri, 26 Feb 2016 11:56:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751777AbcBZL4z (ORCPT ); Fri, 26 Feb 2016 06:56:55 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:61807 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751124AbcBZL4y (ORCPT ); Fri, 26 Feb 2016 06:56:54 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0M5lI9-1ZgjPt2SlN-00xtJE; Fri, 26 Feb 2016 12:56:16 +0100 From: Arnd Bergmann To: Inki Dae Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , David Airlie , Kukjin Kim , Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: exynos: mark pm functions __maybe_unused Date: Fri, 26 Feb 2016 12:55:56 +0100 Message-Id: <1456487773-3963404-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:YLn3iFNECWlKl3de3sEsQbSH4OGhlJ+FRLxEpYBLL3+6X2wEs9g 3muFOvwAyDjOCOWW5fN0yfw2V3Fy3DL7kImPJcyNYRS/PLzkraByp13TgKj0s6/IOEhXWQr 7RE9DSyVPYPL1/+mE2ZM8f66ZK88FIGvxTkH9kcu+nwogcsl2zTzPp+i0eP2qPL25YDQjNB EfesgqxYw7/06lr+ABPig== X-UI-Out-Filterresults: notjunk:1; V01:K0:XhM6iy0MDRA=:exhw2Ki/bEtxRwzxR6reMP GByTjmTGQp8VOfq5DcBjxas8BJ7/7gwx8KKPJkvLPFkI05kRfvdx0hEi05HAdwpHeb1VZsSUl pSKBZlCmp55DigmICZntQwLLEa3rBdUqrgXNEeCwwj0E0ovXn/Qgngvid8AuzAG1AhlRQmLWx 2bYqH3ElQur4MqDn9GTlXYUp8UAyf+8e27pouTJstnNLUDCNyhB9LtSIxNS1xRQhWXEgKx4cB P+4299ZSLu/DnXewBo79+PtWr8yWH0VjrWpd0996PeswAtMgJ6UsIB4MaxoplT72J21f3R9e1 rPbHDNyMjuZ7e4xBv3E5+WDgUlWJFk89WR5Emf01E9Aa86ei4LQjQGnjYI9rtnEpuasizW+4T nMH5RlESeXVtIuPazePc+/krWKkXtMNdoeRTNR+w9R3O05l6F9z6C9vUczZl693hGDrcw3bx1 V/RzrKJX7T8/xnFJNMlh9l5d0f+nzvLGD6yQCIvexTPoukRsquyGjg+FdknXswquVEHb420QU xTzjmmfv+hVLqNTAyYSw3yo+BZn+U/AiFUIJ5y9mNvDis+IxMzoyNwEIU7biW6jhvw55LT6n7 dNcTDnKU6OuAV/7oEMr0RdGtk/hOouNR/ylLzrPZflvKZBxQlIWIDOhIOA6/cAKixGfc8VmPQ mAcfXhbTGbKFSqQq/grjrrmosihHrazi3C/ajcbByBS5KuLK6Tpn/322vBFyPkUNJZeY= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 exynos drm driver implements power management functions that are hidden inside of #ifdef, but when they are all disabled, we get a warning about another unused function that is not called from elsewhere: drivers/gpu/drm/exynos/exynos_drm_gsc.c:1219:12: error: 'gsc_clk_ctrl' defined but not used [-Werror=unused-function] This removes the #ifdef and instead uses a __maybe_unused annotation that avoids the problem because now gcc can see how the function is (not) used and silently drop it. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index 5d20da8f957e..b0a773790f85 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c @@ -1760,8 +1760,7 @@ static int gsc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int gsc_suspend(struct device *dev) +static int __maybe_unused gsc_suspend(struct device *dev) { struct gsc_context *ctx = get_gsc_context(dev); @@ -1773,7 +1772,7 @@ static int gsc_suspend(struct device *dev) return gsc_clk_ctrl(ctx, false); } -static int gsc_resume(struct device *dev) +static int __maybe_unused gsc_resume(struct device *dev) { struct gsc_context *ctx = get_gsc_context(dev); @@ -1784,10 +1783,8 @@ static int gsc_resume(struct device *dev) return 0; } -#endif -#ifdef CONFIG_PM -static int gsc_runtime_suspend(struct device *dev) +static int __maybe_unused gsc_runtime_suspend(struct device *dev) { struct gsc_context *ctx = get_gsc_context(dev); @@ -1796,7 +1793,7 @@ static int gsc_runtime_suspend(struct device *dev) return gsc_clk_ctrl(ctx, false); } -static int gsc_runtime_resume(struct device *dev) +static int __maybe_unused gsc_runtime_resume(struct device *dev) { struct gsc_context *ctx = get_gsc_context(dev); @@ -1804,7 +1801,6 @@ static int gsc_runtime_resume(struct device *dev) return gsc_clk_ctrl(ctx, true); } -#endif static const struct dev_pm_ops gsc_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(gsc_suspend, gsc_resume)