From patchwork Wed Aug 23 13:42:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 110835 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp4147530qge; Wed, 23 Aug 2017 06:43:10 -0700 (PDT) X-Received: by 10.101.70.197 with SMTP id n5mr1611963pgr.298.1503495789746; Wed, 23 Aug 2017 06:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503495789; cv=none; d=google.com; s=arc-20160816; b=MB23Pdk3NfG2NnfK98RtJRkNr1nLe+4rZJrioNC+zXv51PXlHu0xswy14qvQgMeCkZ 2VufHsai5XZDK+MK7T6sopkrQtVkpWqAWQfeSQA2LhB1zyNnUy0eG4+AQNwXN6JODq9s s67tAmep/XQ6B3jWbGCMm7+5NH+gQl9hKnGRpgnPhenmsteigWUNu8OsiXWPtLJdzTR+ mLZNH6UbuOIzBb9IgjDnyMNOIYgCk/vsEXauS5ggU1M/sGRQO6YoW87u9OSOzeAdU5w4 xZdFHzUf7Kjk/al/XsqJ9bAapMaj1Sv4jCkG0VFA3MHKgeVEJ+RSpfaeTurJwXGwvKr2 JpAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=cMjRugpRtl/WM4V1Xfo2ln28SXLmqw2s241sU8D3vG0=; b=io5QFVdnLhn29i2fG5EnPYW4youm0ub//CUItCQ1VVcVsUMXOwvXa0LgVBP5dk9wBo OLRmPhcyAApmOlZYj8+2UQMvWpvggmBaIF7xEmXJut+m7CrqQ706FBDJ3HXxFxvS/bd+ YAjs3EGLNg1CvogA6WIPmRE/fb2l3LROhs6jMkuS1cXUfKG0chIgaBKQMGjbC2WmaPap TvbgKSk/SYPC9mfqEpsyB1BcOOSHIW2Zof/TQvMMGHaJoH3hsPpabt3QIBmtvyWV0YwM Z3EYUXPpE2Fxo1hISG2xXyRBdxkGZOzhg5eJhS7QfEKOlEoPwoJKzqo5sinAh8KXWdEu zIBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l66si1102101pfl.248.2017.08.23.06.43.09; Wed, 23 Aug 2017 06:43:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754041AbdHWNnI (ORCPT + 9 others); Wed, 23 Aug 2017 09:43:08 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:51026 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754006AbdHWNnH (ORCPT ); Wed, 23 Aug 2017 09:43:07 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LqZms-1d7LR42E5q-00eOlR; Wed, 23 Aug 2017 15:43:04 +0200 From: Arnd Bergmann To: Rob Clark , Joerg Roedel Cc: Arnd Bergmann , Stanimir Varbanov , iommu@lists.linux-foundation.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iommu: qcom: annotate PM functions as __maybe_unused Date: Wed, 23 Aug 2017 15:42:45 +0200 Message-Id: <20170823134303.1000996-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:OZQ6y2NW7W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edence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The qcom_iommu_disable_clocks() function is only called from PM code that is hidden in an #ifdef, causing a harmless warning without CONFIG_PM: drivers/iommu/qcom_iommu.c:601:13: error: 'qcom_iommu_disable_clocks' defined but not used [-Werror=unused-function] static void qcom_iommu_disable_clocks(struct qcom_iommu_dev *qcom_iommu) drivers/iommu/qcom_iommu.c:581:12: error: 'qcom_iommu_enable_clocks' defined but not used [-Werror=unused-function] static int qcom_iommu_enable_clocks(struct qcom_iommu_dev *qcom_iommu) Replacing that #ifdef with __maybe_unused annotations lets the compiler drop the functions silently instead. Fixes: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu") Signed-off-by: Arnd Bergmann --- drivers/iommu/qcom_iommu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Rob Clark diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c index 48b62aa52787..c8a587d034b0 100644 --- a/drivers/iommu/qcom_iommu.c +++ b/drivers/iommu/qcom_iommu.c @@ -860,8 +860,7 @@ static int qcom_iommu_device_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int qcom_iommu_resume(struct device *dev) +static int __maybe_unused qcom_iommu_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct qcom_iommu_dev *qcom_iommu = platform_get_drvdata(pdev); @@ -869,7 +868,7 @@ static int qcom_iommu_resume(struct device *dev) return qcom_iommu_enable_clocks(qcom_iommu); } -static int qcom_iommu_suspend(struct device *dev) +static int __maybe_unused qcom_iommu_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct qcom_iommu_dev *qcom_iommu = platform_get_drvdata(pdev); @@ -878,7 +877,6 @@ static int qcom_iommu_suspend(struct device *dev) return 0; } -#endif static const struct dev_pm_ops qcom_iommu_pm_ops = { SET_RUNTIME_PM_OPS(qcom_iommu_suspend, qcom_iommu_resume, NULL)