Received: from eggs.gnu.org ([2001:4830:134:3::10]:56047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXkYV-0001X2-4I for qemu-devel@nongnu.org; Thu, 11 Aug 2016 03:37:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXkYP-0001JM-Vm for qemu-devel@nongnu.org; Thu, 11 Aug 2016 03:37:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXkYP-0001JI-Ng for qemu-devel@nongnu.org; Thu, 11 Aug 2016 03:37:25 -0400 From: Peter Xu Date: Thu, 11 Aug 2016 15:37:16 +0800 Message-Id: <1470901038-9409-1-git-send-email-peterx@redhat.com> Subject: [Qemu-devel] [PATCH 0/2] error-report: introduce error_report_exit() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: armbru@redhat.com, peter.maydell@linaro.org, pbonzini@redhat.com, famz@redhat.com, peterx@redhat.com We use these lines frequently in codes: error_report(SOME_ERROR_STRING); exit(1|EXIT_FAILURE); This patchset provide error_report_exit() to do the above in one line. Peter Xu (2): error-report: provide error_report_exit() error-report: leveraging error_report_exit() arch_init.c | 6 +- bootdevice.c | 4 +- cpus.c | 3 +- device_tree.c | 42 ++--- hw/9pfs/9p.c | 3 +- hw/alpha/dp264.c | 14 +- hw/arm/armv7m.c | 3 +- hw/arm/digic_boards.c | 6 +- hw/arm/fsl-imx6.c | 5 +- hw/arm/highbank.c | 6 +- hw/arm/raspi.c | 7 +- hw/arm/sabrelite.c | 8 +- hw/arm/strongarm.c | 6 +- hw/arm/sysbus-fdt.c | 5 +- hw/arm/vexpress.c | 14 +- hw/arm/virt.c | 42 ++--- hw/arm/xlnx-ep108.c | 9 +- hw/block/tc58128.c | 3 +- hw/block/virtio-blk.c | 9 +- hw/char/exynos4210_uart.c | 9 +- hw/core/machine.c | 5 +- hw/core/platform-bus.c | 8 +- hw/i386/intel_iommu.c | 5 +- hw/i386/pc.c | 35 ++-- hw/i386/pc_piix.c | 3 +- hw/i386/x86-iommu.c | 5 +- hw/ide/core.c | 5 +- hw/intc/ioapic.c | 5 +- hw/intc/xics_kvm.c | 15 +- hw/m68k/an5206.c | 3 +- hw/microblaze/boot.c | 5 +- hw/mips/mips_fulong2e.c | 3 +- hw/mips/mips_jazz.c | 3 +- hw/mips/mips_malta.c | 26 ++- hw/mips/mips_mipssim.c | 5 +- hw/net/virtio-net.c | 27 ++- hw/nvram/fw_cfg.c | 5 +- hw/pci/pci.c | 5 +- hw/ppc/e500.c | 5 +- hw/ppc/mac_newworld.c | 14 +- hw/ppc/mac_oldworld.c | 17 +- hw/ppc/mpc8544ds.c | 3 +- hw/ppc/ppc405_boards.c | 14 +- hw/ppc/prep.c | 11 +- hw/ppc/spapr.c | 85 ++++----- hw/ppc/virtex_ml507.c | 5 +- hw/scsi/vhost-scsi.c | 10 +- hw/scsi/virtio-scsi.c | 9 +- hw/sh4/shix.c | 3 +- hw/smbios/smbios.c | 41 ++--- hw/sparc/sun4m.c | 19 +- hw/tricore/tricore_testboard.c | 8 +- hw/unicore32/puv3.c | 9 +- hw/virtio/virtio.c | 44 ++--- hw/xtensa/sim.c | 4 +- hw/xtensa/xtfpga.c | 16 +- include/qemu/error-report.h | 8 + numa.c | 22 +-- qemu-img.c | 15 +- qemu-io.c | 9 +- qemu-nbd.c | 113 +++++------- replay/replay-char.c | 6 +- replay/replay-events.c | 12 +- replay/replay-internal.c | 4 +- replay/replay-time.c | 3 +- replay/replay.c | 9 +- scripts/coccinelle/error_report_exit.cocci | 13 ++ target-arm/machine.c | 5 +- target-i386/kvm.c | 8 +- target-ppc/kvm.c | 6 +- target-s390x/cpu.c | 5 +- target-s390x/kvm.c | 8 +- target-s390x/mmu_helper.c | 3 +- trace/control.c | 6 +- ui/spice-core.c | 40 ++--- vl.c | 268 +++++++++++------------------ xen-hvm.c | 3 +- 77 files changed, 483 insertions(+), 772 deletions(-) create mode 100644 scripts/coccinelle/error_report_exit.cocci -- 2.7.4