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: 8482941 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A535C9F372 for ; Wed, 2 Mar 2016 16:00:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C275620396 for ; Wed, 2 Mar 2016 16:00:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5A092037C for ; Wed, 2 Mar 2016 16:00:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755995AbcCBQAm (ORCPT ); Wed, 2 Mar 2016 11:00:42 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:51723 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756084AbcCBQA1 (ORCPT ); Wed, 2 Mar 2016 11:00:27 -0500 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 Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Dan Williams , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org 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= Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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)