From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org, alistair.francis@xilinx.com
Subject: Re: [Qemu-devel] [PATCH v7 12/15] hw/timer: Replace fprintf(stderr, "*\n" with error_report()
Date: Sat, 03 Feb 2018 08:51:42 +0100 [thread overview]
Message-ID: <87wozucxyp.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <56dc5bfa-a28b-f088-c9b2-5253f9c31bcf@amsat.org> ("Philippe Mathieu-Daudé"'s message of "Fri, 2 Feb 2018 17:24:03 -0300")
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> On 02/02/2018 03: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.
>>
>> 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 <alistair.francis@xilinx.com>
>>
>> Conversions that aren't followed by exit() dropped, because they might
>> be inappropriate.
>>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>> hw/timer/xilinx_timer.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c
>> index 59439c05be..2d658b5791 100644
>> --- a/hw/timer/xilinx_timer.c
>> +++ b/hw/timer/xilinx_timer.c
>> @@ -127,7 +127,7 @@ timer_read(void *opaque, hwaddr addr, unsigned int size)
>> break;
>>
>> }
>> - D(fprintf(stderr, "%s timer=%d %x=%x\n", __func__, timer, addr * 4, r));
>> + D(error_report("%s timer=%d %x=%x", __func__, timer, addr * 4, r));
>
> Not sure what we gain here, since those aren't error messages but trace
> event.
> Can you drop this patch from your series? I'll convert to tracepoints
> and send a patch for this file.
Done. Thanks!
next prev parent reply other threads:[~2018-02-03 7:51 UTC|newest]
Thread overview: 29+ 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-arm] [PATCH v7 02/15] hw/arm: Replace fprintf(stderr, "*\n" with error_report() Markus Armbruster
2018-02-02 18:37 ` [Qemu-devel] " Markus Armbruster
2018-02-02 19:35 ` Eric Blake
2018-02-03 8:42 ` [Qemu-arm] " Markus Armbruster
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 [this message]
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=87wozucxyp.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=alistair.francis@xilinx.com \
--cc=f4bug@amsat.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.