Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756346AbcCBQAo (ORCPT ); Wed, 2 Mar 2016 11:00:44 -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 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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2297 Lines: 67 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) -- 2.7.0