qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>, qemu-devel@nongnu.org
Cc: linux-renesas-soc@vger.kernel.org,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [PATCH v2 3/3] nvram: at24c: use standard error reporting
Date: Mon, 19 Mar 2018 16:51:04 -0500	[thread overview]
Message-ID: <2071e85f-72b9-9fa5-e5d7-7faa41fb9074@redhat.com> (raw)
In-Reply-To: <20180319213101.6100-4-wsa+renesas@sang-engineering.com>

On 03/19/2018 04:31 PM, Wolfram Sang wrote:
> Replace the ERR macro with error_report() because fprintf is deprecated.
> This also fixes the prefix printed out twice.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>   hw/nvram/eeprom_at24c.c | 17 ++++++-----------
>   1 file changed, 6 insertions(+), 11 deletions(-)
> 

> @@ -63,8 +61,7 @@ int at24c_eeprom_event(I2CSlave *s, enum i2c_event event)
>           if (ee->blk && ee->changed) {
>               int len = blk_pwrite(ee->blk, 0, ee->mem, ee->rsize, 0);
>               if (len != ee->rsize) {
> -                ERR(TYPE_AT24C_EE
> -                        " : failed to write backing file\n");
> +                error_report("failed to write backing file\n");

Drop the \n here and elsewhere in your patch; error_report() already 
does that for you.

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

  reply	other threads:[~2018-03-19 21:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 21:30 [Qemu-devel] [PATCH v2 0/3] nvram: at24c: fix problems related to "rom-size" Wolfram Sang
2018-03-19 21:30 ` [Qemu-devel] [PATCH v2 1/3] nvram: at24c: prevent segfault by checking "rom-size" Wolfram Sang
2018-03-20  0:48   ` Philippe Mathieu-Daudé
2018-03-20 11:07     ` Wolfram Sang
2018-03-19 21:31 ` [Qemu-devel] [PATCH v2 2/3] nvram: at24c: use a sane default for "rom-size" Wolfram Sang
2018-03-20  0:45   ` Philippe Mathieu-Daudé
2018-03-19 21:31 ` [Qemu-devel] [PATCH v2 3/3] nvram: at24c: use standard error reporting Wolfram Sang
2018-03-19 21:51   ` Eric Blake [this message]
2018-03-19 22:07     ` Wolfram Sang
2018-03-20  0:49   ` Philippe Mathieu-Daudé
2018-03-19 21:52 ` [Qemu-devel] [PATCH v2 0/3] nvram: at24c: fix problems related to "rom-size" no-reply

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=2071e85f-72b9-9fa5-e5d7-7faa41fb9074@redhat.com \
    --to=eblake@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wsa+renesas@sang-engineering.com \
    /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).