From patchwork Thu Oct 19 09:30:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10016249 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 388EA600CC for ; Thu, 19 Oct 2017 09:31:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C8DE28AA2 for ; Thu, 19 Oct 2017 09:31:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3138A28BD0; Thu, 19 Oct 2017 09:31:39 +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=ham 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 DFD3528AA2 for ; Thu, 19 Oct 2017 09:31:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752359AbdJSJbh (ORCPT ); Thu, 19 Oct 2017 05:31:37 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:54126 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751609AbdJSJbf (ORCPT ); Thu, 19 Oct 2017 05:31:35 -0400 Received: from wuerfel.lan ([46.223.139.202]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0LfcCc-1dPxng0o82-00pOPL; Thu, 19 Oct 2017 11:30:46 +0200 From: Arnd Bergmann To: Jacob chen , Mauro Carvalho Chehab , Heiko Stuebner Cc: Arnd Bergmann , Hans Verkuil , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] rockchip/rga: annotate PM functions as __maybe_unused Date: Thu, 19 Oct 2017 11:30:34 +0200 Message-Id: <20171019093044.531871-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:n0rzwcJcOsTJTP6gBe8Ctwz06lNUHE7GuNPeKJ6kn6grSxdvbFB XNfFeKV5jZkq94PPca2nh+levPl2p1REhAeFyQtdeLIm0bfD5FTrvU9xbd4a7HzhNjlu6pS BnmBycf0NZ+kXFskVFQza1ya86gX7q0xWRNBS9ZscMQa8B00MBpfwhjpqsoXp7Co2jtnUwk uPOyRyFI6PwF/AdKDR7jQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:t5qnaOWGl/g=:x2rzyIww2c3gmak1sblcOM L1AbNDLzex9NYHJzMM+RstFukAZ/EFGw1Cy9gzLOO8cfmZHP7B/XnWU5cgT2RnsXo8sAklFHE 4pyPGdImq4BL+XcJ+ULwUI5z9opiaVFtHRRQglMpGbDSueDzrdHQfl1ey5QT2aOFiPSAi6l4n Q0a9qZxmKZllIvDudGFMeP8ms8s0UrlBr58nCMTEeDM1jQrARXgxNXFDlD01b9S0NCGRadeNZ hxwpCS1h77g8KBoB14pdZG5g8N/liIKxgSDGHsdQIFYLQFIE1ASREHGaFgjCxW2ZIB2hxcywu Yssxb7BrJKbzojnxDOPrFJoXmzpLAtxODTPvOC6mAsjlsFQZHl8k4kh9ITZ52MbYy0YLNYRWE vXvc4GanvmhyO+I0KY5HCK3bZReRE7DOG4JMz4TvDDYVIK6+6X2spbIx+kvwnTd8FrP1uQRZ+ 212mbvR1zokkUtE+k0/Z7/O/ornIJ/yncphA1p9md3klW/7+U30Uxj+Eoi3mM7sCjROI7duGc fTYPhDSc257jh/Hsy0+4jDF2fu3WpAgYpm0LxmpsdgAzH9X/Vjofds43W8l6skf8n9qsJnWCp 6iM8sNZjxYE9gGKEnTnPGEF7ZOvQunxIkyrtrDlgx2e8OYLSsu2gHBqlYnkH1nCIujcP3hrm2 B4TDvX/DuKKR3z7KUIyoIsbAxmZ7JLKUZrSmeXy4nJ1CmT5UxHjJYEn4Zpg/ldxq1d1+U0Ass cJixPY2xjJ6pE3meQe5yd+OxzGgsyluLJ+wLyg== 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 The newly added driver has incorrect #ifdef annotations on its PM functions, leading to a harmless compile-time warning when CONFIG_PM is disabled: drivers/media/platform/rockchip/rga/rga.c:760:13: error: 'rga_disable_clocks' defined but not used [-Werror=unused-function] static void rga_disable_clocks(struct rockchip_rga *rga) ^~~~~~~~~~~~~~~~~~ drivers/media/platform/rockchip/rga/rga.c:728:12: error: 'rga_enable_clocks' defined but not used [-Werror=unused-function] This removes the #ifdef and marks the functions as __maybe_unused, so gcc can silently drop all the unused code. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Signed-off-by: Arnd Bergmann Acked-by: Sakari Ailus --- drivers/media/platform/rockchip/rga/rga.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index e7d1b34baf1c..89296de9cf4a 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -960,8 +960,7 @@ static int rga_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int rga_runtime_suspend(struct device *dev) +static int __maybe_unused rga_runtime_suspend(struct device *dev) { struct rockchip_rga *rga = dev_get_drvdata(dev); @@ -970,13 +969,12 @@ static int rga_runtime_suspend(struct device *dev) return 0; } -static int rga_runtime_resume(struct device *dev) +static int __maybe_unused rga_runtime_resume(struct device *dev) { struct rockchip_rga *rga = dev_get_drvdata(dev); return rga_enable_clocks(rga); } -#endif static const struct dev_pm_ops rga_pm = { SET_RUNTIME_PM_OPS(rga_runtime_suspend,