From patchwork Fri Nov 18 16:16:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9437011 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 6EA6660755 for ; Fri, 18 Nov 2016 16:19:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 611EE299A3 for ; Fri, 18 Nov 2016 16:19:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55CC9299A1; Fri, 18 Nov 2016 16:19:32 +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=unavailable 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 1C403299A0 for ; Fri, 18 Nov 2016 16:19:31 +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 1c7lsu-00066P-S9; Fri, 18 Nov 2016 16:19:28 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7lrO-0005Pg-L9; Fri, 18 Nov 2016 16:17:58 +0000 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0LnFph-1chwTs1AlR-00hJse; Fri, 18 Nov 2016 17:17:21 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Subject: [PATCH 3/3] [media] mtk-mdp: mark PM functions as __maybe_unused Date: Fri, 18 Nov 2016 17:16:06 +0100 Message-Id: <20161118161621.798004-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161118161621.798004-1-arnd@arndb.de> References: <20161118161621.798004-1-arnd@arndb.de> X-Provags-ID: V03:K0:ejWZnEEoYBz2pxgPvAkfHeiCj8AFcTeBy0M/D3bIYU/OsTz/nKy lQ05nY1BwEywUESo3e8XES9UVInNAilOEPgrmO5iHxdUl9F9qAktnevQnQMrjZfxBG74wwO KGgtIFg8cmEMz/LMI66T4igrB5qFDb297gmi+jSQguQ26zk2zEK3igVkkZvj1yJ4V0k7SDr ShXnZQ69pxfg+s1T7hEuA== X-UI-Out-Filterresults: notjunk:1; V01:K0:lAtxDFWToS0=:/uGzEwPFe7ZgdF8CztZ20Y ThEV9ik7HZwZiNGDNo7Rg/vigj9ewMKw7bbC1hXbNK4SIxVRRgH1Dq/lqsp53DRoliWq1gZeJ 8F2fXtB0PircZa4h+WJXbeF+oaqkMpnBk1DJrYk6wijhbNg8wl5m7D0bnM6NfBTyK3SrjdAGi yfDqik2DTFgjFUAgZRKvrtY5dyrl2IlIvbT5mXSC4ZyY6ZHWfdCzQfdzQXKuqAkY48v9XNKmw WgdzAKDqPdFeGbh39o3Ifpqn0IpnIEp+1lH9QnjgasQ/ELmkeKGTtB2CYxeg36/VkGjLzm6A4 TutImJBwH+4GclQiku8n5vxsjWHkheZs+KnnEBbvs6xIl+a04xrPJ8QrFjcxFWiq0ifxifjs1 CYTd28OYWiVRglpHmgSE0FuV9IS3Q2PqLmdNhyl8uQMMHTQkD4QKmD4sD2KFGYcF7Oz7u+0dO YqGoMHXPH4WGhpL2ZpwDPgQabU7kdPdSSvhfnmuzs11eEd/sczNxItAow6hafye3Y6SqS8zGT hwqWkqjU0fdo0zhKjv8hG2LM3kCi8VMSI35SYU4olRAUS3hlR/sTj6xIucinP61hbhfbb5yOw FbHnoMai6LYmiuC4IVhRytytYwHznA8Gc4QLHr6cQ/Wqmf70JfcZ1S+nLlOsenzFtCr5RexhE XbXe6SK0PtmSwEiy2MaqypQhEjPoa7Sgmvg3Toak5hXp7yV4y8n95OKto3BySDC8mdLo= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161118_081755_182890_708AE59C X-CRM114-Status: GOOD ( 11.48 ) 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 MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The driver still produces a warning when CONFIG_PM is disabled, an earlier fix only partially solved this: media/platform/mtk-mdp/mtk_mdp_core.c:72:13: error: 'mtk_mdp_clock_off' defined but not used [-Werror=unused-function] media/platform/mtk-mdp/mtk_mdp_core.c:63:13: error: 'mtk_mdp_clock_on' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef again and instead marks the PM functions as __maybe_unused, which reliably shuts up the warning. 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 51f2b50e406f..9e4eb7dcc424 100644 --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c @@ -234,8 +234,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); @@ -244,7 +243,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); @@ -252,10 +251,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; @@ -263,14 +260,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)