summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2022-08-22 12:05:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-23 08:40:28 +0200
commite41a88f38d87f730647bb14df9211d32241d1176 (patch)
tree2cf57e2663c67091f4d8aa95dad9e7436290548e /drivers/usb
parentMerge tag 'thunderbolt-for-v6.0-rc3' of git://git.kernel.org/pub/scm/linux/ke... (diff)
downloadlinux-e41a88f38d87f730647bb14df9211d32241d1176.tar.xz
linux-e41a88f38d87f730647bb14df9211d32241d1176.zip
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") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220822100550.3039-1-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/dwc3-qcom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 197583ff3f3d..d3f3937d7005 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.