qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Alistair Francis <alistair.francis@xilinx.com>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: alistair23@gmail.com, qemu-ppc@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v5 20/29] hw/ppc: Replace fprintf(stderr, "*\n" with error_report()
Date: Tue, 14 Nov 2017 09:30:37 +0100	[thread overview]
Message-ID: <a03a0890-4915-8df5-d820-94cdf953beaa@redhat.com> (raw)
In-Reply-To: <6cb7a17813bdc7df94d3efbe5d0b54d90e14ed98.1510612380.git.alistair.francis@xilinx.com>

On 13.11.2017 23:35, 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.
[...]
> @@ -720,7 +720,7 @@ static DeviceState *ppce500_init_mpic_kvm(PPCE500Params *params,
>  
>      CPU_FOREACH(cs) {
>          if (kvm_openpic_connect_vcpu(dev, cs)) {
> -            fprintf(stderr, "%s: failed to connect vcpu to irqchip\n",
> +            error_report("%s: failed to connect vcpu to irqchip",
>                      __func__);

Wrong indentation.

>              abort();
>          }
> @@ -809,7 +809,7 @@ void ppce500_init(MachineState *machine, PPCE500Params *params)
>          cs = CPU(cpu);
>  
>          if (env->mmu_model != POWERPC_MMU_BOOKE206) {
> -            fprintf(stderr, "MMU model %i not supported by this machine.\n",
> +            error_report("MMU model %i not supported by this machine.",
>                  env->mmu_model);

Wrong indentation.

>              exit(1);
>          }
[...]
> diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c
> index ce1254b5d4..3a2c49e3fd 100644
> --- a/hw/ppc/mpc8544_guts.c
> +++ b/hw/ppc/mpc8544_guts.c
> @@ -18,6 +18,7 @@
>   */
>  
>  #include "qemu/osdep.h"
> +#include "qemu/error-report.h"
>  #include "qemu-common.h"
>  #include "cpu.h"
>  #include "hw/hw.h"
> @@ -83,7 +84,7 @@ static uint64_t mpc8544_guts_read(void *opaque, hwaddr addr,
>          value = env->spr[SPR_E500_SVR];
>          break;
>      default:
> -        fprintf(stderr, "guts: Unknown register read: %x\n", (int)addr);
> +        error_report("guts: Unknown register read: %x", (int)addr);
>          break;
>      }
>  
> @@ -102,7 +103,7 @@ static void mpc8544_guts_write(void *opaque, hwaddr addr,
>          }
>          break;
>      default:
> -        fprintf(stderr, "guts: Unknown register write: %x = %x\n",
> +        error_report("guts: Unknown register write: %x = %x",
>                  (int)addr, (unsigned)value);

Wrong indentation.

>          break;
>      }
[...]
> diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
> index 693c215108..12f92b9f2c 100644
> --- a/hw/ppc/ppc440_bamboo.c
> +++ b/hw/ppc/ppc440_bamboo.c
> @@ -12,6 +12,7 @@
>   */
>  
>  #include "qemu/osdep.h"
> +#include "qemu/error-report.h"
>  #include "qemu-common.h"
>  #include "net/net.h"
>  #include "hw/hw.h"
> @@ -80,22 +81,22 @@ static int bamboo_load_device_tree(hwaddr addr,
>      ret = qemu_fdt_setprop(fdt, "/memory", "reg", mem_reg_property,
>                             sizeof(mem_reg_property));
>      if (ret < 0)
> -        fprintf(stderr, "couldn't set /memory/reg\n");
> +        error_report("couldn't set /memory/reg");
>  
>      ret = qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-start",
>                                  initrd_base);
>      if (ret < 0)
> -        fprintf(stderr, "couldn't set /chosen/linux,initrd-start\n");
> +        error_report("couldn't set /chosen/linux,initrd-start");
>  
>      ret = qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-end",
>                                  (initrd_base + initrd_size));
>      if (ret < 0)
> -        fprintf(stderr, "couldn't set /chosen/linux,initrd-end\n");
> +        error_report("couldn't set /chosen/linux,initrd-end");
>  
>      ret = qemu_fdt_setprop_string(fdt, "/chosen", "bootargs",
>                                    kernel_cmdline);
>      if (ret < 0)
> -        fprintf(stderr, "couldn't set /chosen/bootargs\n");
> +        error_report("couldn't set /chosen/bootargs");

While you're at it, add proper curly braces?

>      /* Copy data from the host device tree into the guest. Since the guest can
>       * directly access the timebase without host involvement, we must expose
> @@ -186,7 +187,7 @@ static void bamboo_init(MachineState *machine)
>      env = &cpu->env;
>  
>      if (env->mmu_model != POWERPC_MMU_BOOKE) {
> -        fprintf(stderr, "MMU model %i not supported by this machine.\n",
> +        error_report("MMU model %i not supported by this machine.",
>              env->mmu_model);

Wrong indentation.

[...]
> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> index 5ac4f76613..c1cac864c6 100644
> --- a/hw/ppc/virtex_ml507.c
> +++ b/hw/ppc/virtex_ml507.c
> @@ -187,7 +187,7 @@ static int xilinx_load_device_tree(hwaddr addr,
>  
>      r = qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", kernel_cmdline);
>      if (r < 0)
> -        fprintf(stderr, "couldn't set /chosen/bootargs\n");
> +        error_report("couldn't set /chosen/bootargs");
>      cpu_physical_memory_write(addr, fdt, fdt_size);
>      return fdt_size;
>  }
> @@ -215,7 +215,7 @@ static void virtex_init(MachineState *machine)
>      env = &cpu->env;
>  
>      if (env->mmu_model != POWERPC_MMU_BOOKE) {
> -        fprintf(stderr, "MMU model %i not supported by this machine.\n",
> +        error_report("MMU model %i not supported by this machine.",
>              env->mmu_model);

Wrong indentation.

>          exit(1);
>      }
> 

Before you resend your series, could you please check *all* patches for
correct indentation. I'm getting tired of indicating this ...

 Thanks,
  Thomas

  reply	other threads:[~2017-11-14  8:30 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 22:34 [Qemu-devel] [PATCH v5 00/29] Remove some of the fprintf(stderr, "* Alistair Francis
2017-11-13 22:34 ` [Qemu-devel] [PATCH v5 01/29] audio: Replace AUDIO_FUNC with __func__ Alistair Francis
2017-11-14  9:55   ` Gerd Hoffmann
2017-11-13 22:34 ` [Qemu-devel] [PATCH v5 02/29] Replace all occurances of __FUNCTION__ " Alistair Francis
2017-11-14  9:56   ` Gerd Hoffmann
2017-11-13 22:34 ` [Qemu-devel] [PATCH v5 03/29] Fixes after renaming __FUNCTION__ to __func__ Alistair Francis
2017-11-13 22:34 ` [Qemu-devel] [PATCH v5 04/29] hw/arm: Replace fprintf(stderr, "*\n" with error_report() Alistair Francis
2017-11-13 22:34 ` [Qemu-devel] [PATCH v5 05/29] hw/dma: " Alistair Francis
2017-11-13 22:34 ` [Qemu-devel] [PATCH v5 06/29] hw/gpio: " Alistair Francis
2017-11-13 22:34 ` [Qemu-devel] [PATCH v5 07/29] hw/i2c: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 09/29] hw/ide: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 10/29] hw/intc: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 11/29] hw/ipmi: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 12/29] hw/isa: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 13/29] hw/lm32: " Alistair Francis
2017-11-14  6:54   ` Michael Walle
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 14/29] hw/mips: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 15/29] hw/moxie: " Alistair Francis
2017-11-14  7:53   ` Thomas Huth
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 16/29] hw/nios2: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 17/29] hw/nvram: " Alistair Francis
2017-11-13 23:56   ` [Qemu-devel] [Qemu-trivial] " Philippe Mathieu-Daudé
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 18/29] hw/openrisc: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 19/29] hw/pci*: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 20/29] hw/ppc: " Alistair Francis
2017-11-14  8:30   ` Thomas Huth [this message]
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 21/29] hw/s390x: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 22/29] hw/scsi: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 23/29] hw/sd: " Alistair Francis
2017-11-13 22:35 ` [Qemu-devel] [PATCH v5 24/29] hw/sparc*: " Alistair Francis
2017-11-17 13:45   ` Mark Cave-Ayland
2017-11-13 22:36 ` [Qemu-devel] [PATCH v5 25/29] hw/ssi: " Alistair Francis
2017-11-13 22:36 ` [Qemu-devel] [PATCH v5 26/29] hw/timer: " Alistair Francis
2017-11-14  7:51   ` Thomas Huth
2017-11-13 22:36 ` [Qemu-devel] [PATCH v5 27/29] hw/xen*: " Alistair Francis
2017-11-14  7:47   ` Thomas Huth
2017-11-13 22:36 ` [Qemu-devel] [PATCH v5 28/29] tcg: " Alistair Francis
2017-11-14  7:44   ` Thomas Huth
2017-11-13 22:36 ` [Qemu-devel] [PATCH v5 29/29] target: Use qemu_log() instead of fprintf(stderr, ...) Alistair Francis
2017-11-14  7:40   ` Thomas Huth
2017-12-19 22:43     ` Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a03a0890-4915-8df5-d820-94cdf953beaa@redhat.com \
    --to=thuth@redhat.com \
    --cc=alistair.francis@xilinx.com \
    --cc=alistair23@gmail.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).