From patchwork Fri May 25 16:06:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 136963 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp3777683lji; Fri, 25 May 2018 09:06:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZphk1o8YIW9XQmasE87OweSxstfSiUAmSFPNC6Ty1LWWYitW9KDwgolNn8ARZVfW5qvCMhD X-Received: by 2002:a17:902:8a:: with SMTP id a10-v6mr3199427pla.89.1527264407616; Fri, 25 May 2018 09:06:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527264407; cv=none; d=google.com; s=arc-20160816; b=fJWg+7BVcBgixIcml2qClAm4eF+54JdLM6+CNyCuj0dacds2DjPHorDdmr3OzrVkDD gIxsVY994ly1n5WcF22gmlXh4U0OjDL/P/vW5hKt0dG99aHyMNZmbUPFkRDJQPvK8PSz oKfq6r1hVlgS+MLGnVOZJSEwjteVRXynRN4rUw5LD3RUBjy8TvEAlPUmuesW6W9GRToh zRiCJacG3JlM/fOrnE7JM+91847raeE9vNIbTUnwScwFg1J7sK8MzQblV33fvJD4an99 vI98P6GuFagRFN2NAPXv2cMQBRru/qnmplse2VR3jHJkUzQG237/d1+3qeIKPYqemC1Z HF4A== 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=habInNdw9nvQAGkdPtyR7C3jvrzUsHrApXJVH3aibcs=; b=GiqQnEF+IH4tr9GUzhdlceeGKy4w86RUQPWENfjvTkdqfVjzBTMFpl4ZmRwEY3u2cy hs79oaxkHllIzHAP/k6uCoVKLyDTaj54lLPJtttRvrQW3pNp5do/7tuMeLc+Rh2XVxpx tf+4nvKsfachd2WL3CHVZlr7tFUcQZ5PxU43BYCAccWpsn1KGcYXLBGeIHIJy2xYl25C Z3qWIGHtk6/gVnYPUv8jHofmZC6tqGfl6Sha5ykB6WwACp3ENp+x6VThFIvZ8HlK52Xw S2wk4q+Rr1nG1KsfP9ys825r9uqEkKyrE49FS30T0Bqkm6vcU7so4JSphYuR9bA3oJLA mksw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-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 v5-v6si22541552pfe.63.2018.05.25.09.06.45; Fri, 25 May 2018 09:06:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-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-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966873AbeEYQGo (ORCPT + 3 others); Fri, 25 May 2018 12:06:44 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:48803 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966464AbeEYQGm (ORCPT ); Fri, 25 May 2018 12:06:42 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MRlnN-1fklLG1Pw1-00SsOM; Fri, 25 May 2018 18:06:35 +0200 From: Arnd Bergmann To: Felipe Balbi , Greg Kroah-Hartman Cc: Arnd Bergmann , Manu Gautam , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: dwc3: qcom: mark PM functions as __maybe_unused Date: Fri, 25 May 2018 18:06:20 +0200 Message-Id: <20180525160632.66726-1-arnd@arndb.de> X-Mailer: git-send-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ger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The #ifdef guards around these are wrong, resulting in warnings in certain configurations: drivers/usb/dwc3/dwc3-qcom.c:244:12: error: 'dwc3_qcom_resume' defined but not used [-Werror=unused-function] static int dwc3_qcom_resume(struct dwc3_qcom *qcom) ^~~~~~~~~~~~~~~~ drivers/usb/dwc3/dwc3-qcom.c:223:12: error: 'dwc3_qcom_suspend' defined but not used [-Werror=unused-function] static int dwc3_qcom_suspend(struct dwc3_qcom *qcom) This replaces the guards with __maybe_unused annotations to shut up the warnings and give better compile time coverage. Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Signed-off-by: Arnd Bergmann --- drivers/usb/dwc3/dwc3-qcom.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Douglas Anderson diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 8abb6f31389d..d7a4728b48d5 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -548,8 +548,7 @@ static int dwc3_qcom_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int dwc3_qcom_pm_suspend(struct device *dev) +static int __maybe_unused dwc3_qcom_pm_suspend(struct device *dev) { struct dwc3_qcom *qcom = dev_get_drvdata(dev); int ret = 0; @@ -561,7 +560,7 @@ static int dwc3_qcom_pm_suspend(struct device *dev) return ret; } -static int dwc3_qcom_pm_resume(struct device *dev) +static int __maybe_unused dwc3_qcom_pm_resume(struct device *dev) { struct dwc3_qcom *qcom = dev_get_drvdata(dev); int ret; @@ -572,23 +571,20 @@ static int dwc3_qcom_pm_resume(struct device *dev) return ret; } -#endif -#ifdef CONFIG_PM -static int dwc3_qcom_runtime_suspend(struct device *dev) +static int __maybe_unused dwc3_qcom_runtime_suspend(struct device *dev) { struct dwc3_qcom *qcom = dev_get_drvdata(dev); return dwc3_qcom_suspend(qcom); } -static int dwc3_qcom_runtime_resume(struct device *dev) +static int __maybe_unused dwc3_qcom_runtime_resume(struct device *dev) { struct dwc3_qcom *qcom = dev_get_drvdata(dev); return dwc3_qcom_resume(qcom); } -#endif static const struct dev_pm_ops dwc3_qcom_dev_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(dwc3_qcom_pm_suspend, dwc3_qcom_pm_resume)