From patchwork Wed Mar 2 15:58:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8483131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2CD44C0553 for ; Wed, 2 Mar 2016 16:03:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E9DA20373 for ; Wed, 2 Mar 2016 16:03:18 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 5E17520351 for ; Wed, 2 Mar 2016 16:03:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9DM-0002cB-Qg; Wed, 02 Mar 2016 16:01:28 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9CD-0000V4-HF for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:22 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0LpQRR-1ZwK7j3J9p-00f78e; Wed, 02 Mar 2016 16:59:54 +0100 From: Arnd Bergmann To: Vinod Koul , Barry Song Subject: [PATCH 06/14] dma: sirf: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:58:58 +0100 Message-Id: <1456934350-1389172-7-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456934350-1389172-1-git-send-email-arnd@arndb.de> References: <1456934350-1389172-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:+vEKs4wFgAof4ObNo6aHKO/qoBDRDUEjd77J6HLmqODZYN/x/54 0dGNyvbUqiKXILl4c6jAlRdM7cRp5SZFWGZtBVbfu4upHQdKRyW0ndz56TnAVs3sA6k226o VDpgbvKCBLSC52EptmlFmYCdW3ax+/G6FqjdA7N5C3Y+0CSw3hK/mX50XkVJhSJOg0dibBD XY1rwaOvKbf88bqmzqBbA== X-UI-Out-Filterresults: notjunk:1; V01:K0:x2G3ud8xMfw=:9DztB+jj3KeHEhraEg5wzf qtRj6T/S6+ynQLL9V1oVnmzWHP9YVD2vMqgzFCiJAG41NrEWsWD2H5iqgTwtm3iUbRNdaGEQE I+AaRIfsGKMd2LfUlebUW/43grVMnPMd1XPlIT90H07Rk0shSSMKHnZzGLUliu1AWmsvxmmaE MUu8GnACw5aKsup1QOQgYFNm8ae06tBm1ZU819t8yqu1PQFzKD+xMI5Jat689ao1DWSKXxuBA LjncpFmAvKeZaAai/UKr4h5RER1iB+KyMHaa5K+lhY5xR5fWcmzxIHNeoSbm6GkX5eXh+fa2p 9GFRyyn5o4yQ1cqBhjriGgEmU7tZItBrTsaYApFYWw/Gqv3qTweOhEx5bekPTNmEiXcjrqdGW 27rfkg4Xo/LMxvxjcvDYeePkTO7Er/0IGMMwjOusjW8Ur8LqsBV2lbDmQ74muHmw8HEd0hHCy tn5WAn1Ox+wK4mbocCh5rIICy5vh1sQNreXnPalpAcLvkQFo5JqtBNHRDkUUYsVqGbsaCx3jl 7WepN7dgnpwm9nMnXhvnLlcJuzs5ePMXnBsGry3gbN4xWbhxWfPGrMxhmZBbIv8I/6jBcZsDF mX4IRt0nOMYh9Z0ml8txuqYvSftHVva5Qe2ihVloObXz+C7dtmVFNqgLaat5mWQQgrBpWd3rw rzgennTgeS+5EBfC1/gC7dAYp7+u73CPmtKhBeKwi6PBGON1ieN3UlVGChwRE/2OO2rc= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080018_024171_86AD788E X-CRM114-Status: GOOD ( 12.48 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, Dan Williams , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The sirf dma driver uses #ifdef to check for CONFIG_PM_SLEEP for its suspend/resume code but then has no #ifdef for the respective runtime PM code, so we get a warning if CONFIG_PM is disabled altogether: drivers/dma/sirf-dma.c:1000:12: error: 'sirfsoc_dma_runtime_resume' defined but not used [-Werror=unused-function] This removes the existing #ifdef and instead uses __maybe_unused annotations for all four functions to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/dma/sirf-dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index 22ea2419ee56..e48350e65089 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -989,7 +989,7 @@ static int sirfsoc_dma_remove(struct platform_device *op) return 0; } -static int sirfsoc_dma_runtime_suspend(struct device *dev) +static int __maybe_unused sirfsoc_dma_runtime_suspend(struct device *dev) { struct sirfsoc_dma *sdma = dev_get_drvdata(dev); @@ -997,7 +997,7 @@ static int sirfsoc_dma_runtime_suspend(struct device *dev) return 0; } -static int sirfsoc_dma_runtime_resume(struct device *dev) +static int __maybe_unused sirfsoc_dma_runtime_resume(struct device *dev) { struct sirfsoc_dma *sdma = dev_get_drvdata(dev); int ret; @@ -1010,8 +1010,7 @@ static int sirfsoc_dma_runtime_resume(struct device *dev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int sirfsoc_dma_pm_suspend(struct device *dev) +static int __maybe_unused sirfsoc_dma_pm_suspend(struct device *dev) { struct sirfsoc_dma *sdma = dev_get_drvdata(dev); struct sirfsoc_dma_regs *save = &sdma->regs_save; @@ -1062,7 +1061,7 @@ static int sirfsoc_dma_pm_suspend(struct device *dev) return 0; } -static int sirfsoc_dma_pm_resume(struct device *dev) +static int __maybe_unused sirfsoc_dma_pm_resume(struct device *dev) { struct sirfsoc_dma *sdma = dev_get_drvdata(dev); struct sirfsoc_dma_regs *save = &sdma->regs_save; @@ -1121,7 +1120,6 @@ static int sirfsoc_dma_pm_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops sirfsoc_dma_pm_ops = { SET_RUNTIME_PM_OPS(sirfsoc_dma_runtime_suspend, sirfsoc_dma_runtime_resume, NULL)