From patchwork Wed Oct 26 09:43:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9396491 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 716F1600BA for ; Wed, 26 Oct 2016 09:45:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BFE528624 for ; Wed, 26 Oct 2016 09:45:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2074729A0E; Wed, 26 Oct 2016 09:45:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3426828624 for ; Wed, 26 Oct 2016 09:45:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753753AbcJZJpo (ORCPT ); Wed, 26 Oct 2016 05:45:44 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:55285 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821AbcJZJpm (ORCPT ); Wed, 26 Oct 2016 05:45:42 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0LrVgT-1d2XDp2oXt-013Kml; Wed, 26 Oct 2016 11:44:16 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Arnd Bergmann , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Matthias Brugger , Hans Verkuil , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] media: mtk-mdp: mark PM functions as __maybe_unused Date: Wed, 26 Oct 2016 11:43:43 +0200 Message-Id: <20161026094411.785911-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 X-Provags-ID: V03:K0:q0rEGhYQleQKzjzjVqQ3T/3wgIB+TnrydxgX3s8i8XzM3I7+x3y hx5nQkWvzOxR978r8PhZlZtcriTtf1nSoPNVi9OUbnk8AXpvRBOoaBSq41vw5gKSORorsUK fkHRpOLU1VXhGXycIEKluzSmr5euPbtIZ8SaCC7SJb6tnwNKDdIGQE6S7UifGTAWFmYBYli 86T9buSxIMDDmwbDWptkQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:LGC+ortwWkk=:aUsHlryIA1ck0tk1gRLdd3 Uv0va7sU5+Pk7hWJuXbmVw8m+zpU/qg85R9Y5QtA6O5UMc2BkCv3U6Yp20XIt00F7+gmnVKZH wb4JLwtqBbZzUjMl3YTf8hpXjCASL6KZOrLXNURW7EfNud1C4tuCm68IQhMzvEX4Km5Eo57o4 ZiUC/5Tlc3cIRdVw5K7LRESrJnaabTR4JK6W5VGMkHAPnafNd1xFG3Xn7lTNnqGsKWFnwxcGp 25A5vGZITH6Sz0eZnWxlCUOg+RzQ8mnRyHt2yKYomQSKUFOTjXk44xrbyV1xd+BJzhRA164ui 9RDfgIEaPVBEfH8NmIP4uiHwVhUq6g0+AmJmcB6/wNYXRjypWJEmNRd8Gu0Jq2/F520dXu0o2 hUmkzMEsZ69WPYv2OCNcKG+3EsQdwIW67xCW0mvv7GMjgqsup90RUP04IGK5nOMnQlS317i53 yasxb6vSLWBRhPs1PdeYuhWjGWSV75qO7l1GQCTxTyAqmhQns7ouAco6fD7nZDnonPvSnhd+2 Dn3qkPQrB6jwEYQ2MUppB9lN0MpNyue+WFtQorDur73mUjGxsGO6kw4NhnEDWaNgyqFpj5sPs M85sMnBAeJ3Bw1eWPx9arIPehRHEiEV157MX83HyzQVbVKaCzUx/CQNgFrr3yuhrTKnV+W1dM ZA6Db1aLESMd+Nhrwqsrd6BzKB2ygijSWGR2GePt+fm7DNUsliizd/ZMDpGnNVVTBWaruHtU0 /gq3nEoltZ1OgmRy Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A previous patch tried to fix a build error, but introduced another warning: drivers/media/platform/mtk-mdp/mtk_mdp_core.c:71:13: error: ‘mtk_mdp_clock_off’ defined but not used [-Werror=unused-function] drivers/media/platform/mtk-mdp/mtk_mdp_core.c:62:13: error: ‘mtk_mdp_clock_on’ defined but not used [-Werror=unused-function] This marks all the PM functions as __maybe_unused and removes the #ifdef around them, as that will always do the right thing. Fixes: 1b06fcf56aa6 ("[media] media: mtk-mdp: fix build error") Signed-off-by: Arnd Bergmann --- drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c index 40a229d8a1f5..d4c740263457 100644 --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c @@ -233,8 +233,7 @@ static int mtk_mdp_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int mtk_mdp_pm_suspend(struct device *dev) +static int __maybe_unused mtk_mdp_pm_suspend(struct device *dev) { struct mtk_mdp_dev *mdp = dev_get_drvdata(dev); @@ -243,7 +242,7 @@ static int mtk_mdp_pm_suspend(struct device *dev) return 0; } -static int mtk_mdp_pm_resume(struct device *dev) +static int __maybe_unused mtk_mdp_pm_resume(struct device *dev) { struct mtk_mdp_dev *mdp = dev_get_drvdata(dev); @@ -251,10 +250,8 @@ static int mtk_mdp_pm_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM */ -#ifdef CONFIG_PM_SLEEP -static int mtk_mdp_suspend(struct device *dev) +static int __maybe_unused mtk_mdp_suspend(struct device *dev) { if (pm_runtime_suspended(dev)) return 0; @@ -262,14 +259,13 @@ static int mtk_mdp_suspend(struct device *dev) return mtk_mdp_pm_suspend(dev); } -static int mtk_mdp_resume(struct device *dev) +static int __maybe_unused mtk_mdp_resume(struct device *dev) { if (pm_runtime_suspended(dev)) return 0; return mtk_mdp_pm_resume(dev); } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops mtk_mdp_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(mtk_mdp_suspend, mtk_mdp_resume)