summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-04-30 21:37:50 +0800
committersakumisu <[email protected]>2025-04-30 21:37:50 +0800
commit577ebd0999db91a28b4a0ebc1c5c013d5c77fa31 (patch)
tree174677e35e8936436bc78f1062a6f8dc240ca42d
parentc27458d71aaf7f46744e75082251e4a570517b1f (diff)
fix unused warnings
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--class/hub/usbh_hub.c4
-rw-r--r--core/usbh_core.c2
-rw-r--r--port/dwc2/usb_dc_dwc2.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/class/hub/usbh_hub.c b/class/hub/usbh_hub.c
index 54377a74..7feb3001 100644
--- a/class/hub/usbh_hub.c
+++ b/class/hub/usbh_hub.c
@@ -152,6 +152,7 @@ static int _usbh_hub_clear_feature(struct usbh_hub *hub, uint8_t port, uint8_t f
return usbh_control_transfer(hub->parent, setup, NULL);
}
+#if CONFIG_USBHOST_MAX_EXTHUBS > 0
static int _usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth)
{
struct usb_setup_packet *setup;
@@ -167,7 +168,6 @@ static int _usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth)
return usbh_control_transfer(hub->parent, setup, NULL);
}
-#if CONFIG_USBHOST_MAX_EXTHUBS > 0
static int parse_hub_descriptor(struct usb_hub_descriptor *desc, uint16_t length)
{
(void)length;
@@ -270,6 +270,7 @@ int usbh_hub_clear_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature)
}
}
+#if CONFIG_USBHOST_MAX_EXTHUBS > 0
static int usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth)
{
struct usb_setup_packet roothub_setup;
@@ -288,7 +289,6 @@ static int usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth)
}
}
-#if CONFIG_USBHOST_MAX_EXTHUBS > 0
static void hub_int_complete_callback(void *arg, int nbytes)
{
struct usbh_hub *hub = (struct usbh_hub *)arg;
diff --git a/core/usbh_core.c b/core/usbh_core.c
index 15187a0b..03ed3b9d 100644
--- a/core/usbh_core.c
+++ b/core/usbh_core.c
@@ -330,6 +330,8 @@ static void usbh_print_hubport_info(struct usbh_hubport *hport)
static void usbh_print_setup(struct usb_setup_packet *setup)
{
+ (void)setup;
+
USB_LOG_DBG("Setup: "
"bmRequestType 0x%02x, bRequest 0x%02x, wValue 0x%04x, wIndex 0x%04x, wLength 0x%04x\r\n",
setup->bmRequestType,
diff --git a/port/dwc2/usb_dc_dwc2.c b/port/dwc2/usb_dc_dwc2.c
index 390d3031..229acd3c 100644
--- a/port/dwc2/usb_dc_dwc2.c
+++ b/port/dwc2/usb_dc_dwc2.c
@@ -1023,7 +1023,7 @@ int usbd_ep_start_read(uint8_t busid, const uint8_t ep, uint8_t *data, uint32_t
void USBD_IRQHandler(uint8_t busid)
{
- uint32_t gint_status, temp, ep_idx, ep_intr, epint, read_count, daintmask;
+ uint32_t gint_status, temp, ep_idx, ep_intr, epint, read_count;
gint_status = dwc2_get_glb_intstatus(busid);
if ((USB_OTG_GLB->GINTSTS & 0x1U) == USB_OTG_MODE_DEVICE) {