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: 102615 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2461325lbc; Wed, 2 Mar 2016 08:02:33 -0800 (PST) X-Received: by 10.66.167.237 with SMTP id zr13mr40126919pab.85.1456934551983; Wed, 02 Mar 2016 08:02:31 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id t63si58972114pfi.53.2016.03.02.08.02.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:02:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.10 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.10 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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+patch=linaro.org@lists.infradead.org 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(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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)