qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 3/8] hw: Replace fprintf(stderr, "*\n" with e


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v1 3/8] hw: Replace fprintf(stderr, "*\n" with error_report()
Date: Tue, 26 Sep 2017 05:51:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 26.09.2017 02:08, Alistair Francis wrote:
> Replace a large number of the fprintf(stderr, "*\n" calls with
> error_report(). The functions were renamed with these commands and then
> compiler issues where manually fixed.
> 
> find ./* -type f -exec sed -i \
>     'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, 
> "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> find ./* -type f -exec sed -i \
>     'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, 
> "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> find ./* -type f -exec sed -i \
>     'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, 
> "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> find ./* -type f -exec sed -i \
>     'N;N;N;N;N;N;N;N; {s|fprintf(stderr, 
> "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> find ./* -type f -exec sed -i \
>     'N;N;N;N;N;N;N; {s|fprintf(stderr, 
> "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> find ./* -type f -exec sed -i \
>     'N;N;N;N;N;N; {s|fprintf(stderr, 
> "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> find ./* -type f -exec sed -i \
>     'N;N;N;N;N; {s|fprintf(stderr, 
> "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> find ./* -type f -exec sed -i \
>     'N;N;N;N; {s|fprintf(stderr, 
> "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> find ./* -type f -exec sed -i \
>     'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' 
> \
>     {} +
> find ./* -type f -exec sed -i \
>     'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> find ./* -type f -exec sed -i \
>     'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
>     {} +
> 
> Some lines where then manually tweaked to pass checkpatch.
> 
> Signed-off-by: Alistair Francis <address@hidden>
> Cc: Andrzej Zaborowski <address@hidden>
> Cc: Jan Kiszka <address@hidden>
> Cc: Stefan Hajnoczi <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Thomas Huth <address@hidden>
> Cc: Gerd Hoffmann <address@hidden>
> Cc: "Michael S. Tsirkin" <address@hidden>
> Cc: Richard Henderson <address@hidden>
> Cc: Eduardo Habkost <address@hidden>
> Cc: Stefano Stabellini <address@hidden>
> Cc: Anthony Perard <address@hidden>
> Cc: John Snow <address@hidden>
> Cc: Christian Borntraeger <address@hidden>
> Cc: Cornelia Huck <address@hidden>
> Cc: Alexander Graf <address@hidden>
> Cc: Michael Walle <address@hidden>
> Cc: Paul Burton <address@hidden>
> Cc: Aurelien Jarno <address@hidden>
> Cc: Yongbok Kim <address@hidden>
> Cc: "Hervé Poussineau" <address@hidden>
> Cc: Anthony Green <address@hidden>
> Cc: Jason Wang <address@hidden>
> Cc: Chris Wulff <address@hidden>
> Cc: Marek Vasut <address@hidden>
> Cc: Jia Liu <address@hidden>
> Cc: Stafford Horne <address@hidden>
> Cc: Marcel Apfelbaum <address@hidden>
> Cc: Magnus Damm <address@hidden>
> Cc: Fabien Chouteau <address@hidden>
> Cc: Mark Cave-Ayland <address@hidden>
> Cc: Artyom Tarasenko <address@hidden>
> Cc: address@hidden
> Cc: address@hidden
> Cc: address@hidden
> Cc: address@hidden
> ---
> 
>  hw/arm/armv7m.c                 |  2 +-
>  hw/arm/boot.c                   | 34 +++++++++----------
>  hw/arm/gumstix.c                | 13 ++++----
>  hw/arm/mainstone.c              |  7 ++--
>  hw/arm/musicpal.c               |  2 +-
>  hw/arm/omap1.c                  |  5 +--
>  hw/arm/omap2.c                  | 21 ++++++------
>  hw/arm/omap_sx1.c               |  6 ++--
>  hw/arm/palm.c                   | 10 +++---
>  hw/arm/pxa2xx.c                 |  7 ++--
>  hw/arm/stellaris.c              |  3 +-
>  hw/arm/tosa.c                   | 17 +++++-----
>  hw/arm/versatilepb.c            |  2 +-
>  hw/arm/vexpress.c               |  8 ++---
>  hw/arm/z2.c                     |  6 ++--
>  hw/block/dataplane/virtio-blk.c |  6 ++--
>  hw/block/onenand.c              |  8 ++---
>  hw/block/tc58128.c              | 44 ++++++++++++-------------
>  hw/bt/core.c                    | 15 +++++----
>  hw/bt/hci-csr.c                 | 17 +++++-----
>  hw/bt/hci.c                     | 30 ++++++++---------
>  hw/bt/hid.c                     |  2 +-
>  hw/bt/l2cap.c                   | 47 ++++++++++++++-------------
>  hw/bt/sdp.c                     |  7 ++--
>  hw/char/exynos4210_uart.c       |  6 ++--
>  hw/char/mcf_uart.c              |  5 +--
>  hw/char/sh_serial.c             |  9 +++---
>  hw/core/loader.c                | 31 +++++++++---------
>  hw/core/ptimer.c                |  7 ++--
>  hw/cris/axis_dev88.c            |  3 +-
>  hw/cris/boot.c                  |  5 +--
>  hw/display/blizzard.c           | 20 ++++++------
>  hw/display/omap_dss.c           | 14 ++++----
>  hw/display/pl110.c              |  2 +-
>  hw/display/pxa2xx_lcd.c         |  2 +-
>  hw/display/qxl-render.c         |  7 ++--
>  hw/display/qxl.c                | 10 +++---
>  hw/display/tc6393xb.c           | 36 ++++++++++++---------
>  hw/display/virtio-gpu-3d.c      |  4 +--
>  hw/display/vmware_vga.c         | 22 ++++++-------
>  hw/dma/omap_dma.c               | 26 ++++++++-------
>  hw/dma/soc_dma.c                | 37 ++++++++++-----------
>  hw/gpio/omap_gpio.c             |  2 +-
>  hw/i2c/omap_i2c.c               | 10 +++---
>  hw/i386/kvm/apic.c              |  9 +++---
>  hw/i386/kvm/clock.c             |  7 ++--
>  hw/i386/kvm/i8254.c             |  7 ++--
>  hw/i386/kvm/i8259.c             |  5 +--
>  hw/i386/kvm/ioapic.c            |  5 +--
>  hw/i386/multiboot.c             | 21 ++++++------
>  hw/i386/pc.c                    | 18 +++++------
>  hw/i386/pc_piix.c               |  2 +-
>  hw/i386/pc_sysfw.c              |  5 +--
>  hw/i386/xen/xen-hvm.c           | 32 +++++++++---------
>  hw/i386/xen/xen-mapcache.c      | 12 +++----
>  hw/i386/xen/xen_apic.c          |  2 +-
>  hw/ide/ahci.c                   |  6 ++--
>  hw/ide/core.c                   |  2 +-
>  hw/input/lm832x.c               |  6 ++--
>  hw/input/pckbd.c                |  3 +-
>  hw/input/pxa2xx_keypad.c        |  2 +-
>  hw/input/tsc2005.c              | 17 +++++-----
>  hw/input/tsc210x.c              | 72 
> ++++++++++++++++++++---------------------
>  hw/input/virtio-input-hid.c     | 14 ++++----
>  hw/input/virtio-input.c         |  5 +--
>  hw/intc/arm_gic_kvm.c           | 12 +++----
>  hw/intc/omap_intc.c             |  4 +--
>  hw/intc/openpic.c               |  7 ++--
>  hw/intc/openpic_kvm.c           |  8 ++---
>  hw/intc/s390_flic_kvm.c         |  4 +--
>  hw/ipmi/ipmi.c                  |  1 +
>  hw/ipmi/ipmi_bmc_extern.c       |  5 +--
>  hw/isa/isa-bus.c                |  7 ++--
>  hw/lm32/lm32_boards.c           |  5 +--
>  hw/lm32/milkymist.c             |  5 +--
>  hw/m68k/an5206.c                |  4 +--
>  hw/m68k/mcf5206.c               |  3 +-
>  hw/m68k/mcf5208.c               |  7 ++--
>  hw/microblaze/boot.c            |  2 +-
>  hw/mips/boston.c                |  4 +--
>  hw/mips/mips_fulong2e.c         |  4 +--
>  hw/mips/mips_jazz.c             |  4 +--
>  hw/mips/mips_malta.c            |  4 +--
>  hw/mips/mips_mipssim.c          |  4 +--
>  hw/mips/mips_r4k.c              |  6 ++--
>  hw/misc/a9scu.c                 |  3 +-
>  hw/misc/omap_gpmc.c             | 11 ++++---
>  hw/misc/omap_l4.c               |  5 +--
>  hw/misc/omap_sdrc.c             |  3 +-
>  hw/misc/vmport.c                |  2 +-
>  hw/moxie/moxiesim.c             |  7 ++--
>  hw/net/fsl_etsec/etsec.c        |  2 +-
>  hw/net/pcnet.c                  |  2 +-
>  hw/net/smc91c111.c              |  5 +--
>  hw/net/vhost_net.c              | 16 ++++-----
>  hw/nios2/boot.c                 |  2 +-
>  hw/nvram/eeprom93xx.c           |  5 +--
>  hw/nvram/fw_cfg.c               |  4 +--
>  hw/openrisc/openrisc_sim.c      |  3 +-
>  hw/pci-host/bonito.c            |  6 ++--
>  hw/pci/pci.c                    | 10 +++---
>  hw/ppc/e500.c                   | 20 ++++++------
>  hw/ppc/mac_newworld.c           |  2 +-
>  hw/ppc/mac_oldworld.c           |  2 +-
>  hw/ppc/mpc8544_guts.c           |  5 +--
>  hw/ppc/ppc405_boards.c          |  8 ++---
>  hw/ppc/ppc440_bamboo.c          | 19 +++++------
>  hw/ppc/ppc4xx_pci.c             |  3 +-
>  hw/ppc/prep.c                   |  4 +--
>  hw/ppc/virtex_ml507.c           |  4 +--
>  hw/s390x/virtio-ccw.c           |  2 +-
>  hw/scsi/lsi53c895a.c            |  4 +--
>  hw/scsi/spapr_vscsi.c           | 49 ++++++++++++++--------------
>  hw/scsi/virtio-scsi-dataplane.c |  6 ++--
>  hw/sd/pl181.c                   |  5 +--
>  hw/sd/sd.c                      | 14 ++++----
>  hw/sh4/r2d.c                    |  9 +++---
>  hw/sh4/sh7750.c                 | 64 ++++++++++++++++++------------------
>  hw/sparc/leon3.c                |  9 +++---
>  hw/sparc/sun4m.c                |  8 ++---
>  hw/sparc64/niagara.c            |  2 +-
>  hw/sparc64/sun4u.c              |  9 +++---
>  hw/ssi/omap_spi.c               |  5 +--
>  hw/timer/omap_gptimer.c         | 11 ++++---
>  hw/timer/twl92230.c             |  2 +-
>  hw/timer/xilinx_timer.c         |  8 ++---
>  hw/usb/core.c                   | 15 +++++----
>  hw/usb/desc.c                   |  4 +--
>  hw/usb/dev-audio.c              | 29 +++++++++--------
>  hw/usb/dev-bluetooth.c          |  4 +--
>  hw/usb/dev-mtp.c                |  9 +++---
>  hw/usb/dev-network.c            | 20 ++++++------
>  hw/usb/hcd-ehci.c               | 32 +++++++++---------
>  hw/usb/hcd-musb.c               |  4 +--
>  hw/usb/hcd-xhci.c               |  3 +-
>  hw/usb/host-legacy.c            |  2 +-
>  hw/watchdog/watchdog.c          |  9 +++---
>  hw/watchdog/wdt_i6300esb.c      |  8 +++--
>  hw/xen/xen-common.c             | 10 +++---
>  hw/xen/xen_pt.c                 |  4 +--
>  hw/xenpv/xen_domainbuild.c      | 24 +++++++-------
>  hw/xenpv/xen_machine_pv.c       |  8 ++---
>  142 files changed, 769 insertions(+), 705 deletions(-)

This patch is IMHO way to big! Can you please break this down into the
individual hw/* subsystems, so that people who are familiar with a
certain subsystem have a chance to review just their part? Thanks.

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]