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: 8436281 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1DBBD9F314 for ; Fri, 26 Feb 2016 11:56:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 38A3C203A4 for ; Fri, 26 Feb 2016 11:56:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7A2682037C for ; Fri, 26 Feb 2016 11:56:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0343B6EAB3; Fri, 26 Feb 2016 11:56:27 +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.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9659D6EAB4 for ; Fri, 26 Feb 2016 11:56:25 +0000 (UTC) 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 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= Cc: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Arnd Bergmann , Seung-Woo Kim , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.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: , MIME-Version: 1.0 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 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)