Wenchao Xia <xiaw...@linux.vnet.ibm.com> writes: > monitor_vprintf() is called in the code path, and it will not print > when monitor is in qmp mode, so checking monitor mode in > error_printf_unless_qmp() is useless, remove it to simplify the code.
Suggest to reword: error_printf_unless_qmp() is no longer useful, because plain error_printf() doesn't print anything in a QMP monitor since commit b8b0826. > Signed-off-by: Wenchao Xia <xiaw...@linux.vnet.ibm.com> > --- > hw/usb/bus.c | 2 +- > hw/usb/hcd-ehci.c | 4 ++-- > include/qemu/error-report.h | 1 - > util/qemu-error.c | 11 ----------- > 4 files changed, 3 insertions(+), 15 deletions(-) > > diff --git a/hw/usb/bus.c b/hw/usb/bus.c > index 72d5b92..817a69a 100644 > --- a/hw/usb/bus.c > +++ b/hw/usb/bus.c > @@ -328,7 +328,7 @@ int usb_register_companion(const char *masterbus, USBPort > *ports[], > qerror_report(QERR_INVALID_PARAMETER_VALUE, "masterbus", > "an USB masterbus"); > if (bus) { > - error_printf_unless_qmp( > + error_report( > "USB bus '%s' does not allow companion controllers\n", > masterbus); > } Doesn't this change add location information? I think you want error_printf(), not error_report(). Same for the other uses. [...]