Received: from eggs.gnu.org ([2001:4830:134:3::10]:35487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX8FX-00041V-Fo for qemu-devel@nongnu.org; Fri, 18 Oct 2013 07:29:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VX8FR-0003Fp-Fx for qemu-devel@nongnu.org; Fri, 18 Oct 2013 07:29:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX8FR-0003FR-6W for qemu-devel@nongnu.org; Fri, 18 Oct 2013 07:29:41 -0400 From: Markus Armbruster References: <1382058681-14957-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1382058681-14957-7-git-send-email-xiawenc@linux.vnet.ibm.com> Date: Fri, 18 Oct 2013 13:29:35 +0200 In-Reply-To: <1382058681-14957-7-git-send-email-xiawenc@linux.vnet.ibm.com> (Wenchao Xia's message of "Fri, 18 Oct 2013 09:11:14 +0800") Message-ID: <87li1qu89s.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 06/13] error: remove error_printf_unless_qmp() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, stefanha@gmail.com, pbonzini@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com Wenchao Xia 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 > --- > 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. [...]