From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: [PATCH v3 2/3] hw/usb/hcd-xhci: Remove the FIXME macro
Date: Mon, 13 Jul 2026 12:05:07 +0200 [thread overview]
Message-ID: <20260713100508.123623-3-thuth@redhat.com> (raw)
In-Reply-To: <20260713100508.123623-1-thuth@redhat.com>
From: Thomas Huth <thuth@redhat.com>
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.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/usb/hcd-xhci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index f5bb7d25600..ee913d5c4d5 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -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
@@ -1675,7 +1673,7 @@ static int xhci_try_complete_packet(XHCITransfer *xfer)
default:
DPRINTF("%s: FIXME: status = %d\n", __func__,
xfer->packet.status);
- FIXME("unhandled USB_RET_*");
+ g_assert_not_reached();
}
return 0;
}
--
2.55.0
next prev parent reply other threads:[~2026-07-13 10:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 10:05 [PATCH v3 0/3] Rework FIXMEs and fprintfs in hcd-xhci.c Thomas Huth
2026-07-13 10:05 ` [PATCH v3 1/3] hw/usb/hcd-xhci: Turn guest-triggerable abort() into qemu_log_mask() Thomas Huth
2026-07-13 10:15 ` Peter Maydell
2026-07-13 10:05 ` Thomas Huth [this message]
2026-07-13 10:16 ` [PATCH v3 2/3] hw/usb/hcd-xhci: Remove the FIXME macro Peter Maydell
2026-07-13 10:32 ` Thomas Huth
2026-07-13 10:45 ` Philippe Mathieu-Daudé
2026-07-13 10:05 ` [PATCH v3 3/3] hw/usb/hcd-xhci: Use qemu_log_mask() instead of fprintf() statement Thomas Huth
2026-07-13 10:17 ` Peter Maydell
2026-07-13 10:30 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260713100508.123623-3-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.