@samitouri / QOSamiQemu / commits / 96c9f9709d

hw/usb/hcd-xhci: Remove the FIXME macro

The FIXME macro is only used in one case, which should hopefully never trigger: The containing function handles all the USB_RET_* values except for USB_RET_ADD_TO_QUEUE and USB_RET_REMOVE_FROM_QUEUE, which are both internal return values for when an async packet needs to be queued or dequeued, and which shouldn't still be the status by the time we get to this function. Thus let's simplify this spot and use a g_assert_not_reached() instead (and remove the DPRINT() in front of it to avoid that code analyzers trip over unreachable code here). Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260713161406.361197-3-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>

Thomas Huth committed Jul 13, 2026 at 18:14 UTC 96c9f9709d66204b485e669cfc465c6201519b76
1 file changed +1 -5
hw/usb/hcd-xhci.c
+1 -5
@@ -39,8 +39,6 @@
39 #else
40 #define DPRINTF(...) do {} while (0)
41 #endif
42 -#define FIXME(_msg) do { fprintf(stderr, "FIXME %s:%d %s\n", \
43 - __func__, __LINE__, _msg); abort(); } while (0)
42
43 #define TRB_LINK_LIMIT 32
44 #define COMMAND_LIMIT 256
@@ -1673,9 +1671,7 @@ static int xhci_try_complete_packet(XHCITransfer *xfer)
1671 xhci_stall_ep(xfer);
1672 break;
1673 default:
1676 - DPRINTF("%s: FIXME: status = %d\n", __func__,
1677 - xfer->packet.status);
1678 - FIXME("unhandled USB_RET_*");
1674 + g_assert_not_reached();
1675 }
1676 return 0;
1677 }