Skip to contentSkip to conversation

usb: dwc3: qcom: suppress unused-variable warning

PATCH New Johan Hovold 1 participant 1 message Aug 22, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc3: qcom: suppress unused-variable warning

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")
---
 drivers/usb/dwc3/dwc3-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-qcom.c +1 -1
index b3ba9aaf876c..8298aebd395e 100644
@@ -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.
Signature · 1 line
2.35.1