From patchwork Mon Mar 20 09:47:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9633601 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 7C9186020B for ; Mon, 20 Mar 2017 09:49:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7515127317 for ; Mon, 20 Mar 2017 09:49:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67FFF27FA0; Mon, 20 Mar 2017 09:49:28 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 16A0227317 for ; Mon, 20 Mar 2017 09:49:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xgQyZqMDT0oi1C9yo5vjZkYala7FyaUwbu+2snlLXZ4=; b=a49GLDS2eZuxyBfUzJha4mojqk EboRyKDgjrwok/VVSv3eIWsUZvTt/FVRnFutjCCJX9HvL+z10OAuy3tKuuMRr9TgKTn+MfgJxYM/d IaITYEQUG5HQWHJHJVQPqXjr4yY0ZfR7vjdZ39xet15OXOoKUHu4YhhynMneGiuaQMsOzG24wNtpx Z8Ylzf3SHlt9USwOkozQY8j2HsMS08c1RRDAwCpipDnAaIufhsXVLUcLyM59je4lFg+pblgXYW7BR mE9PjegW/WRR55+uIqKqRL0rjMeCizFXt1nYZuXioDyAnPlKY4DHc4YHSXNb2HrC8VAhVrRXKZnsL 0olbtfTg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cptwM-0005UW-4O; Mon, 20 Mar 2017 09:49:26 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cptw6-00056r-4Y; Mon, 20 Mar 2017 09:49:12 +0000 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MNcni-1crZwp3gtu-007AOM; Mon, 20 Mar 2017 10:48:42 +0100 From: Arnd Bergmann To: Rick Chang , Bin Liu , Mauro Carvalho Chehab Subject: [PATCH 2/2] [media] vcodec: mediatek: mark pm functions as __maybe_unused Date: Mon, 20 Mar 2017 10:47:55 +0100 Message-Id: <20170320094812.1365229-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170320094812.1365229-1-arnd@arndb.de> References: <20170320094812.1365229-1-arnd@arndb.de> X-Provags-ID: V03:K0:g/Nyuin6Kq1gLXpESeInO5CvRjqbv1TbP2o3Udb7y64hZzgybLa lZE5lfxEszLwW99atooZIC6dMopQngs7pCyHcI+qU/4WCm2u5rlXDnef9BHokT3vWD0xD9C fIa1l6mA+4erC3Kqukg8WhBv32lB6awp0NH/KcjUCJ/C+DNFQd7so6IJdAWZ2gUXuWz33L2 SJ97rxk7dMnxiMVj5GQZw== X-UI-Out-Filterresults: notjunk:1; V01:K0:/RLPK+P9ZLk=:7qieO08GCnr/6a+nE0hDD1 +RwvI62AYaYXnPzubxWXHWKWnKziS1vTGGK5V2x/MJ3OBhZj/kEb+K0/JWQ3F9aHnjEASHRCn gGTWirbdNExvv/TrGVq5BjmhNZBuv6obiuzM8s9ipyXnuFXlGDnsgFuortlG4ba0DMgQGmVac 8gBholZNHrO+2qmnpa2HvF/4giX9+xpXAZn1XqAk0t7SJTN2f1JRuJLf2VmMvpjGb4urQ8ctg wjBF2sY6gFf/BdBpVMGyfjuTfq9d9cV7/PpJhEvGwWCRIsMkDdVIvKjEG7nYAjoaBY5GUsaHM xWCOYSs+8RZqAUjRfE5E8sGY67qHxJwXVe4KNrFWldStpMhVa3MsG9x85Dh4qTYllSa4QLVQY QKUFcQ7hGno8xGnQ3OHNpF72Mi7mhTghwSQii+HB+gg0kevlOuwlteVD5vzpwEZRCmIqZ5Eew 05stAlodQ6s5ROWN01U3jozDRt+mcXzcgALF/0fhaDmvNWmS9kudoQLr5qQqgICSzsjvtuG4V pQjTGtlPX0HjZ88LPNuYZTBTJ/pNHXf4ILU5DK8p3l1fonhLnTL0UczpIZ/UXWz3E0PO4Azkb R88h/GmyXuRUStjg7MNGDEy0TEae2I698t3ollBX2eaGi/s0T7XeXOf5DB4TU6NbyDV85b5lu BYCo1mPNH2ti6zaIPW79uWHaDC0nuOq9OjZSw6vY+5TcR2Vocn9k0cniVWcu3CBc6wA4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170320_024910_521962_C1608C9F X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Minghsiu Tsai , Arnd Bergmann , linux-kernel@vger.kernel.org, Ricky Liang , linux-mediatek@lists.infradead.org, Matthias Brugger , 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 When CONFIG_PM is disabled, we get a couple of unused functions: drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:927:13: error: 'mtk_jpeg_clk_off' defined but not used [-Werror=unused-function] static void mtk_jpeg_clk_off(struct mtk_jpeg_dev *jpeg) ^~~~~~~~~~~~~~~~ drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:916:13: error: 'mtk_jpeg_clk_on' defined but not used [-Werror=unused-function] static void mtk_jpeg_clk_on(struct mtk_jpeg_dev *jpeg) Rather than adding more error-prone #ifdefs around those, this patch removes the existing #ifdef checks and marks the PM functions as __maybe_unused to let gcc do the right thing. Signed-off-by: Arnd Bergmann Acked-by: Rick Chang --- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index f9bd58ce7d32..7103b6da25d2 100644 --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c @@ -1224,8 +1224,7 @@ static int mtk_jpeg_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int mtk_jpeg_pm_suspend(struct device *dev) +static __maybe_unused int mtk_jpeg_pm_suspend(struct device *dev) { struct mtk_jpeg_dev *jpeg = dev_get_drvdata(dev); @@ -1235,7 +1234,7 @@ static int mtk_jpeg_pm_suspend(struct device *dev) return 0; } -static int mtk_jpeg_pm_resume(struct device *dev) +static __maybe_unused int mtk_jpeg_pm_resume(struct device *dev) { struct mtk_jpeg_dev *jpeg = dev_get_drvdata(dev); @@ -1244,10 +1243,8 @@ static int mtk_jpeg_pm_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM */ -#ifdef CONFIG_PM_SLEEP -static int mtk_jpeg_suspend(struct device *dev) +static __maybe_unused int mtk_jpeg_suspend(struct device *dev) { int ret; @@ -1258,7 +1255,7 @@ static int mtk_jpeg_suspend(struct device *dev) return ret; } -static int mtk_jpeg_resume(struct device *dev) +static __maybe_unused int mtk_jpeg_resume(struct device *dev) { int ret; @@ -1269,7 +1266,6 @@ static int mtk_jpeg_resume(struct device *dev) return ret; } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops mtk_jpeg_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(mtk_jpeg_suspend, mtk_jpeg_resume)