All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, alistair.francis@xilinx.com
Subject: Re: [Qemu-devel] [PATCH v7 02/15] hw/arm: Replace fprintf(stderr, "*\n" with error_report()
Date: Fri, 2 Feb 2018 13:35:52 -0600	[thread overview]
Message-ID: <11be568a-8c6d-3d45-8c32-dc41ea70c352@redhat.com> (raw)
In-Reply-To: <20180202183731.29990-3-armbru@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2050 bytes --]

On 02/02/2018 12:37 PM, Markus Armbruster wrote:
> From: Alistair Francis <alistair.francis@xilinx.com>
> 
> 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.
> 

> 
> Some lines where then manually tweaked to pass checkpatch.
> 
> The 'qemu: ' prefix was manually removed from the hw/arm/boot.c file.
> 
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Cc: qemu-arm@nongnu.org
> 
> Conversions that aren't followed by exit() dropped, because they might
> be inappropriate.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---

> +++ b/hw/arm/gumstix.c
> @@ -35,6 +35,7 @@
>   */
>  
>  #include "qemu/osdep.h"
> +#include "qemu/error-report.h"
>  #include "hw/hw.h"
>  #include "hw/arm/pxa.h"
>  #include "net/net.h"
> @@ -62,8 +63,8 @@ static void connex_init(MachineState *machine)
>  
>      dinfo = drive_get(IF_PFLASH, 0, 0);
>      if (!dinfo && !qtest_enabled()) {
> -        fprintf(stderr, "A flash image must be given with the "
> -                "'pflash' parameter\n");
> +        error_report("A flash image must be given with the "
> +                     "'pflash' parameter");
>          exit(1);
>      }
>  
> @@ -76,7 +77,7 @@ static void connex_init(MachineState *machine)
>                                 dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
>                                 sector_len, connex_rom / sector_len,
>                                 2, 0, 0, 0, 0, be)) {
> -        fprintf(stderr, "qemu: Error registering flash memory.\n");
> +        error_report("Error registering flash memory.");

Do we care about consistency on trailing dots in these conversions?

At any rate, all of these are sane rewrites of existing patterns;
Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2018-02-02 19:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 18:37 [Qemu-devel] [PATCH v7 00/15] Remove some of the fprintf(stderr, "* Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 01/15] audio: Replace AUDIO_FUNC with __func__ Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 02/15] hw/arm: Replace fprintf(stderr, "*\n" with error_report() Markus Armbruster
2018-02-02 19:35   ` Eric Blake [this message]
2018-02-03  8:42     ` Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 03/15] hw/dma: " Markus Armbruster
2018-02-03 20:18   ` Thomas Huth
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 04/15] hw/lm32: " Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 05/15] hw/mips: " Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 06/15] hw/moxie: " Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 07/15] hw/openrisc: " Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 08/15] hw/pci*: " Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 09/15] hw/ppc: " Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 10/15] hw/sd: " Markus Armbruster
2018-02-03 20:12   ` Thomas Huth
2018-02-05  6:27     ` Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 11/15] hw/sparc*: " Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 12/15] hw/timer: " Markus Armbruster
2018-02-02 20:24   ` Philippe Mathieu-Daudé
2018-02-03  7:51     ` Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 13/15] hw/xen*: " Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 14/15] tcg: " Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] [PATCH v7 15/15] target: Use qemu_log() instead of fprintf(stderr, ...) Markus Armbruster
2018-02-02 19:59   ` Eric Blake
2018-02-03  7:42     ` Markus Armbruster
2018-02-02 19:45 ` [Qemu-devel] [PATCH v7 00/15] Remove some of the fprintf(stderr, "* Alistair Francis
2018-02-02 20:21 ` Philippe Mathieu-Daudé

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=11be568a-8c6d-3d45-8c32-dc41ea70c352@redhat.com \
    --to=eblake@redhat.com \
    --cc=alistair.francis@xilinx.com \
    --cc=armbru@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.