From: Cornelia Huck <cohuck@redhat.com>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
alistair23@gmail.com, armbru@redhat.com, qemu-s390x@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v6 21/29] hw/s390x: Replace fprintf(stderr, "*\n" with error_report()
Date: Tue, 9 Jan 2018 18:45:23 +0100 [thread overview]
Message-ID: <20180109184523.3d0aab51.cohuck@redhat.com> (raw)
In-Reply-To: <3f49c0ff601f27534d4536c87c00d01c233e067f.1513790495.git.alistair.francis@xilinx.com>
On Wed, 20 Dec 2017 09:24:41 -0800
Alistair Francis <alistair.francis@xilinx.com> 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.
>
> One fprintf(stderr, was manually converted to a
> qemu_log_mask(LOG_GUEST_ERROR,
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
> V3:
> - Use a qemu_log_mask(LOG_GUEST_ERROR,
> V2:
> - Split hw patch into individual directories
>
> hw/s390x/virtio-ccw.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index 38f6a8afc9..3d8f26949b 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -426,8 +426,9 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
> * passes us zeroes for those we don't support.
> */
> if (features.features) {
> - fprintf(stderr, "Guest bug: features[%i]=%x (expected 0)\n",
> - features.index, features.features);
> + qemu_log_mask(LOG_GUEST_ERROR,
> + "Guest bug: features[%i]=%x (expected 0)",
> + features.index, features.features);
> /* XXX: do a unit check here? */
> }
> }
I'll queue this to s390-next so this doesn't get lost.
I'll also tweak the commit message, as nothing is converted to
error_report().
next prev parent reply other threads:[~2018-01-09 17:45 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 17:22 [Qemu-devel] [PATCH v6 00/29] Remove some of the fprintf(stderr, "* Alistair Francis
2017-12-20 17:22 ` [Qemu-devel] [PATCH v6 01/29] audio: Replace AUDIO_FUNC with __func__ Alistair Francis
2017-12-20 17:22 ` [Qemu-devel] [PATCH v6 02/29] Replace all occurances of __FUNCTION__ " Alistair Francis
2017-12-20 17:22 ` [Qemu-devel] [PATCH v6 03/29] Fixes after renaming __FUNCTION__ to __func__ Alistair Francis
2017-12-20 17:23 ` [Qemu-devel] [PATCH v6 04/29] hw/arm: Replace fprintf(stderr, "*\n" with error_report() Alistair Francis
2017-12-22 15:21 ` Markus Armbruster
2017-12-22 15:37 ` Markus Armbruster
2017-12-22 17:17 ` Thomas Huth
2017-12-22 19:57 ` Alistair Francis
2017-12-22 20:30 ` Markus Armbruster
2017-12-22 20:58 ` Alistair Francis
2018-01-02 12:59 ` Markus Armbruster
2018-01-09 0:32 ` Alistair Francis
2018-01-09 15:31 ` Thomas Huth
2017-12-20 17:23 ` [Qemu-devel] [PATCH v6 05/29] hw/dma: " Alistair Francis
2017-12-22 15:21 ` Markus Armbruster
2017-12-20 17:23 ` [Qemu-devel] [PATCH v6 06/29] hw/gpio: " Alistair Francis
2017-12-20 17:23 ` [Qemu-devel] [PATCH v6 07/29] hw/i2c: " Alistair Francis
2017-12-20 17:23 ` [Qemu-devel] [PATCH v6 09/29] hw/ide: " Alistair Francis
2017-12-20 17:23 ` [Qemu-devel] [PATCH v6 10/29] hw/intc: " Alistair Francis
2017-12-20 17:23 ` [Qemu-devel] [PATCH v6 11/29] hw/ipmi: " Alistair Francis
2017-12-20 17:23 ` [Qemu-devel] [PATCH v6 12/29] hw/isa: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 13/29] hw/lm32: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 14/29] hw/mips: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 15/29] hw/moxie: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 16/29] hw/nios2: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 17/29] hw/nvram: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 18/29] hw/openrisc: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 19/29] hw/pci*: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 20/29] hw/ppc: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 21/29] hw/s390x: " Alistair Francis
2018-01-09 17:45 ` Cornelia Huck [this message]
2018-01-09 18:09 ` Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 23/29] hw/sd: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 24/29] hw/sparc*: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 25/29] hw/ssi: " Alistair Francis
2017-12-20 17:24 ` [Qemu-devel] [PATCH v6 26/29] hw/timer: " Alistair Francis
2017-12-20 17:25 ` [Qemu-devel] [PATCH v6 27/29] hw/xen*: " Alistair Francis
2017-12-20 17:25 ` [Qemu-devel] [PATCH v6 28/29] tcg: " Alistair Francis
2017-12-20 17:25 ` [Qemu-devel] [PATCH v6 29/29] target: Use qemu_log() instead of fprintf(stderr, ...) Alistair Francis
[not found] ` <97bff6488fbc4c6b2c10879798aa149a43426fd9.1513790495.git.alistair.francis@xilinx.com>
2017-12-20 22:10 ` [Qemu-devel] [PATCH v6 08/29] hw/i386: Replace fprintf(stderr, "*\n" with error_report() Eduardo Habkost
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=20180109184523.3d0aab51.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=alistair.francis@xilinx.com \
--cc=alistair23@gmail.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@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).