From patchwork Mon Jul 4 13:14:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9212619 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 9157C60572 for ; Mon, 4 Jul 2016 13:12:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80E0D286F1 for ; Mon, 4 Jul 2016 13:12:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73F6A286E3; Mon, 4 Jul 2016 13:12:04 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01227286E3 for ; Mon, 4 Jul 2016 13:12:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753416AbcGDNLq (ORCPT ); Mon, 4 Jul 2016 09:11:46 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:63100 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753595AbcGDNLp (ORCPT ); Mon, 4 Jul 2016 09:11:45 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0M1od8-1bYzD90dXm-00tkh8; Mon, 04 Jul 2016 15:11:37 +0200 From: Arnd Bergmann To: Vinod Koul Cc: Arnd Bergmann , Dan Williams , Andy Gross , Stanimir Varbanov , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: qcom-bam-dma: add __maybe_unused annotations for PM Date: Mon, 4 Jul 2016 15:14:08 +0200 Message-Id: <20160704131440.1027790-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:eJPTVBe6OaotwdKVL0U73wy1/wdtWcmWSSK8xe5mOa0y7c+HTgK dcatYjp98/h0g3Y+ZV32nxVjKT++yZRubCpqCPS5fxmrTQ99Ml3MQDNVXncoJ5/IEYC2DyQ kjFu4w6Q1yWhP0CvNnEewb2q2ih1c243tbVgbjZE6LUSkTyq8W6fUMiKdNzgdiDGsvyPvQ0 soDLhP7KhBbC+QWpUUgpA== X-UI-Out-Filterresults: notjunk:1; V01:K0:t2vHTz9OSEY=:CnheBKHGFdm7iMrPZagN5W qq+ELYcNCsFBUwhgFm4cl5k0Xdunq7Y2qrXumXWfcictb97QaXr6nmI2/nGABZKg29JR6DZHx zVka050+FJdSfEJCRdj19xo4I83VzlyovZud/Q/1emLBh+GaY6knkCSb/FWRqmmS2FdQP9EBp +YgNZMpPbxj9m/cHB9FIEJVVxM8vHeRTV+4yH+Eb9K2xPc+kSb8WFcW5n1DGb8Puzd8fBaor0 SBXpaCSy/DE0YbLPLrJfqkZ64c7J8V+FxeznedeYf9ajcL17GG2IAH0UTSLLIrcwOweLc3M4S K4EGUNc0tyZ29Eph8mUx+GUFes1XUrMyNliMCJC3NLJJpTQ42ETUMD331wr++IIvweW8/t9pU zbu+3BzteiPw2vLAnQ1XEnk3/3mbjAozC5xbbN96jpmC+uhI2lhkw9qgfqdVB1WRk6Y4gxbxA DEW/hoED1iOCV1Tc09FPNTYZS2Z47jtc5sGH38gCsPGhNWWRb5GA4Pd8OA4buPEdDLf7Um7Bw TSvZ08pAOTPDWGbTyEzl61t3guijp0L0IpjFjJlY9pb4rGgZPVlce0KyeRNqJ1ap5Lo3XgPSj TQTTkx85MESuxJwW9uz/lt7LPEyZ1VlGj0Xet9Ey+mzNgjANuQdSabq4tmtDVPsBzODQwHUV5 sOR6+A8ltxi2KAINLSvKJwzf5Sj5SayY9/5ip2loxGOH2yfqh3gGSwTQ/7RmK4XMsN18= Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The bam_dma driver gained runtime PM support, but that causes build warnings whenever CONFIG_PM is disabled: drivers/dma/qcom/bam_dma.c:1324:12: error: 'bam_dma_runtime_resume' defined but not used [-Werror=unused-function] static int bam_dma_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~ drivers/dma/qcom/bam_dma.c:1315:12: error: 'bam_dma_runtime_suspend' defined but not used [-Werror=unused-function] static int bam_dma_runtime_suspend(struct device *dev) This removes the incomplete #ifdef guard and instead marks all four PM functions as __maybe_unused, which avoids this kind of warning. Signed-off-by: Arnd Bergmann Fixes: 7d2545599f5b ("dmaengine: qcom-bam-dma: Add pm_runtime support") --- drivers/dma/qcom/bam_dma.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 4754891742ad..03c4eb3fd314 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -1312,7 +1312,7 @@ static int bam_dma_remove(struct platform_device *pdev) return 0; } -static int bam_dma_runtime_suspend(struct device *dev) +static int __maybe_unused bam_dma_runtime_suspend(struct device *dev) { struct bam_device *bdev = dev_get_drvdata(dev); @@ -1321,7 +1321,7 @@ static int bam_dma_runtime_suspend(struct device *dev) return 0; } -static int bam_dma_runtime_resume(struct device *dev) +static int __maybe_unused bam_dma_runtime_resume(struct device *dev) { struct bam_device *bdev = dev_get_drvdata(dev); int ret; @@ -1334,8 +1334,8 @@ static int bam_dma_runtime_resume(struct device *dev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int bam_dma_suspend(struct device *dev) + +static int __maybe_unused bam_dma_suspend(struct device *dev) { struct bam_device *bdev = dev_get_drvdata(dev); @@ -1346,7 +1346,7 @@ static int bam_dma_suspend(struct device *dev) return 0; } -static int bam_dma_resume(struct device *dev) +static int __maybe_unused bam_dma_resume(struct device *dev) { struct bam_device *bdev = dev_get_drvdata(dev); int ret; @@ -1359,7 +1359,6 @@ static int bam_dma_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops bam_dma_pm_ops = { SET_LATE_SYSTEM_SLEEP_PM_OPS(bam_dma_suspend, bam_dma_resume)