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>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
5257259428
commit
96c9f9709d
@@ -39,8 +39,6 @@
|
||||
#else
|
||||
#define DPRINTF(...) do {} while (0)
|
||||
#endif
|
||||
#define FIXME(_msg) do { fprintf(stderr, "FIXME %s:%d %s\n", \
|
||||
__func__, __LINE__, _msg); abort(); } while (0)
|
||||
|
||||
#define TRB_LINK_LIMIT 32
|
||||
#define COMMAND_LIMIT 256
|
||||
@@ -1673,9 +1671,7 @@ static int xhci_try_complete_packet(XHCITransfer *xfer)
|
||||
xhci_stall_ep(xfer);
|
||||
break;
|
||||
default:
|
||||
DPRINTF("%s: FIXME: status = %d\n", __func__,
|
||||
xfer->packet.status);
|
||||
FIXME("unhandled USB_RET_*");
|
||||
g_assert_not_reached();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user