From patchwork Tue Sep 6 13:30:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101850 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp550026qgf; Tue, 6 Sep 2016 06:30:13 -0700 (PDT) X-Received: by 10.66.50.164 with SMTP id d4mr71781864pao.96.1473168613024; Tue, 06 Sep 2016 06:30:13 -0700 (PDT) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id sj4si35386716pab.213.2016.09.06.06.30.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Sep 2016 06:30:13 -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 4430D6E5DC; Tue, 6 Sep 2016 13:30:12 +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 [217.72.192.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id E15BA6E5DC for ; Tue, 6 Sep 2016 13:30:10 +0000 (UTC) Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MMWH0-1bhq0W0eUw-008JFn; Tue, 06 Sep 2016 15:29:58 +0200 From: Arnd Bergmann To: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park Subject: [PATCH, RESEND] drm: exynos: avoid unused function warning Date: Tue, 6 Sep 2016 15:30:07 +0200 Message-Id: <20160906133027.2206326-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:az7PedPibKiQ4iE7XhxdEj81jmtzZ1CSErU6AQknc4kjrerlK2D to9iPUj7uwvsf2NpNvaVKpldKJAq6S98J8YNDFLvo+IWX+wG5D3K/hsALDgu3OYKwKaVGlg ClQYGrQnGx4kh2gqeiK0Wfi15No04oZXPABCZpECgsDroMz0W9GpGdBzIrgu8sVSzjPrQN0 MCZyOBsr7gzK+Q0pjS9qw== X-UI-Out-Filterresults: notjunk:1; V01:K0:rPmkGSF0FuY=:jgFPZJBx5k8m3sRj+Nn+Zf l4ATFtkG4+9QBp/wOpI2+li8b2FdjqcQJ7IYzvAScsvYmzgpzhhNn7iNI2bZrIh/U9V0+5v95 omWOnPCtHLbbtKjXUJK4tAkPi/dFwC+i4zKrs0uGMLWv/S/ciz9NczQnCKz5zyYkdGtEPlizv 9DGXV+hv2HoZdOFZdgCkrRR8ds8KH8XEVBBcXGx4pXYFjyzOMp50/YA4cRSrahMpKt7j238Zy IjadZQcAYQ8z98wD8DkXwOnoENPzT/BC0XwmcmwXIm5lsFNPbp2KmiZ6GrLawqeusPZImIXdP UoQ8oum2T9Sb/ROqXq1/ci81N773S8I9HvpFMt4VRXCBGk0mQR9/dXl6xzB54LeS+vXa5+r+6 j3cTkAeUE2BE3hTDl5xZW1bnljPnP4H0GqF9dCOzRTb+hS7kqKEVz/eHYo1ZKqUBWFY+Q0LEp pJ2uvfv22acWZlvgRjRO/LZjofPog/Bn+ecn3ZQTG4OjxjfGg0p4U8HDlyj0clXuYUuHRyuQD eenGXHcefXbj9GqqontXBpAXmPeH8a6EP+2yaAhu7mcAqsc6qIFXjEMeZSwCNrVIdAjN9Lbwn g+1p5jMW6f/qNLHA7q4+HLOmYSJ5+f3rItsjWf4UIE6JESihUJv5UH6SAfr65aU4cHQW5aa0j v+2UlZBVnTQT+LW34/k9TraLiCRHtxGM0MQ5wBGO0blHHg/9xo1jWPtoJswIwO1TTLnw= Cc: linux-samsung-soc@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Javier Martinez Canillas , Kukjin Kim , dri-devel@lists.freedesktop.org, Ingi Kim , Gustavo Padovan , linux-arm-kernel@lists.infradead.org, Marek Szyprowski 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" When CONFIG_PM is not set, we get a warning about an unused function: drivers/gpu/drm/exynos/exynos_drm_gsc.c:1219:12: error: 'gsc_clk_ctrl' defined but not used [-Werror=unused-function] static int gsc_clk_ctrl(struct gsc_context *ctx, bool enable) ^~~~~~~~~~~~ This removes the two #ifdef checks in this file and instead marks the functions as __maybe_unused, which is a more reliable way of doing the same, allowing better build coverage and avoiding the warning above. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) Originally sent on July 11, but I just got this again and noticed it had never been applied, and I didn't get any reply for the patch. 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)