From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRdN5-0005MN-9q for qemu-devel@nongnu.org; Sat, 28 Feb 2015 04:07:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRdN4-0004lw-Hn for qemu-devel@nongnu.org; Sat, 28 Feb 2015 04:07:39 -0500 From: zhanghailiang Date: Sat, 28 Feb 2015 17:05:23 +0800 Message-ID: <1425114327-12136-2-git-send-email-zhang.zhanghailiang@huawei.com> In-Reply-To: <1425114327-12136-1-git-send-email-zhang.zhanghailiang@huawei.com> References: <1425114327-12136-1-git-send-email-zhang.zhanghailiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH RFC 1/5] serial-pci: Avoid qerror_report_err() outside QMP command handlers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial@nongnu.org Cc: zhanghailiang , peter.huangpeng@huawei.com, armbru@redhat.com, qemu-devel@nongnu.org qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in serial_pci_init() and multi_serial_pci_init(). Signed-off-by: zhanghailiang --- hw/char/serial-pci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c index f05c9b4..2b0bf54 100644 --- a/hw/char/serial-pci.c +++ b/hw/char/serial-pci.c @@ -27,7 +27,6 @@ #include "hw/char/serial.h" #include "hw/pci/pci.h" -#include "qapi/qmp/qerror.h" #define PCI_SERIAL_MAX_PORTS 4 @@ -57,8 +56,7 @@ static int serial_pci_init(PCIDevice *dev) s->baudbase = 115200; serial_realize_core(s, &err); if (err != NULL) { - qerror_report_err(err); - error_free(err); + error_report_err(err); return -1; } @@ -116,8 +114,7 @@ static int multi_serial_pci_init(PCIDevice *dev) s->baudbase = 115200; serial_realize_core(s, &err); if (err != NULL) { - qerror_report_err(err); - error_free(err); + error_report_err(err); return -1; } s->irq = pci->irqs[i]; -- 1.7.12.4