Linux-USB Archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: qcom: suppress unused-variable warning
@ 2022-08-22 10:05 Johan Hovold
  0 siblings, 0 replies; only message in thread
From: Johan Hovold @ 2022-08-22 10:05 UTC (permalink / raw
  To: Greg Kroah-Hartman
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Felipe Balbi,
	linux-arm-msm, linux-usb, linux-kernel, Johan Hovold,
	kernel test robot

The dwc3_qcom_read_usb2_speed() helper is now only called when the
controller is acting as host, but the compiler will warn that the hcd
variable is unused in gadget-only W=1 builds.

Fixes: c06795f114a6 ("usb: dwc3: qcom: fix gadget-only builds")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/usb/dwc3/dwc3-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index b3ba9aaf876c..8298aebd395e 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -310,7 +310,7 @@ static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom)
 {
 	struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3);
 	struct usb_device *udev;
-	struct usb_hcd *hcd;
+	struct usb_hcd __maybe_unused *hcd;
 
 	/*
 	 * FIXME: Fix this layering violation.
-- 
2.35.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-22 10:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-22 10:05 [PATCH] usb: dwc3: qcom: suppress unused-variable warning Johan Hovold

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 read-only IMAP folder(s) and NNTP newsgroup(s).