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: 9396483 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 212BE60236 for ; Wed, 26 Oct 2016 09:44:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0F1329A5A for ; Wed, 26 Oct 2016 09:44:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4BAE29A64; Wed, 26 Oct 2016 09:44:56 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5578C29A5A for ; Wed, 26 Oct 2016 09:44:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bzKlS-0007oj-Um; Wed, 26 Oct 2016 09:44:54 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bzKlP-0007mK-Uy; Wed, 26 Oct 2016 09:44:53 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161026_024452_336995_640CF3BC X-CRM114-Status: GOOD ( 12.45 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Minghsiu Tsai , Arnd Bergmann , linux-kernel@vger.kernel.org, Houlong Wei , Hans Verkuil , Matthias Brugger , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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)