linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anders Roxell <anders.roxell@linaro.org>
To: balbi@kernel.org, gregkh@linuxfoundation.org,
	enric.balletbo@collabora.com
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Anders Roxell <anders.roxell@linaro.org>
Subject: usb: dwc3: of-simple: mark PM functions as __maybe_unused
Date: Tue, 31 Jul 2018 23:24:05 +0200	[thread overview]
Message-ID: <20180731212405.27572-1-anders.roxell@linaro.org> (raw)

The suspend/resume functions are not referenced when power messagement
is enabled:
  CC      drivers/video/fbdev/matrox/matroxfb_DAC1064.o
drivers/usb/dwc3/dwc3-of-simple.c:223:12: warning: ‘dwc3_of_simple_resume’ defined but not used [-Wunused-function]
 static int dwc3_of_simple_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/dwc3-of-simple.c:213:12: warning: ‘dwc3_of_simple_suspend’ defined but not used [-Wunused-function]
 static int dwc3_of_simple_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~
This marks them as __maybe_unused to let the compiler drop the function
without complaining.

Fixes: 76251db86561 ("usb: dwc3: of-simple: reset host controller at suspend/resume")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/usb/dwc3/dwc3-of-simple.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
index 40bf9e0bbc59..8f6d39463e99 100644
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -210,7 +210,7 @@ static int dwc3_of_simple_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int dwc3_of_simple_suspend(struct device *dev)
+static int __maybe_unused dwc3_of_simple_suspend(struct device *dev)
 {
 	struct dwc3_of_simple *simple = dev_get_drvdata(dev);
 
@@ -220,7 +220,7 @@ static int dwc3_of_simple_suspend(struct device *dev)
 	return 0;
 }
 
-static int dwc3_of_simple_resume(struct device *dev)
+static int __maybe_unused dwc3_of_simple_resume(struct device *dev)
 {
 	struct dwc3_of_simple *simple = dev_get_drvdata(dev);
 

                 reply	other threads:[~2018-07-31 21:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180731212405.27572-1-anders.roxell@linaro.org \
    --to=anders.roxell@linaro.org \
    --cc=balbi@kernel.org \
    --cc=enric.balletbo@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).