All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, alistair.francis@xilinx.com
Subject: Re: [Qemu-devel] [PATCH v7 10/15] hw/sd: Replace fprintf(stderr, "*\n" with error_report()
Date: Mon, 05 Feb 2018 07:27:17 +0100	[thread overview]
Message-ID: <87vafcx86y.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <9dd954df-35d1-5f27-0be5-5ecc572529f0@redhat.com> (Thomas Huth's message of "Sat, 3 Feb 2018 21:12:43 +0100")

Thomas Huth <thuth@redhat.com> writes:

> On 02.02.2018 19:37, 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.
>
> I think you could pretty much ditch the original patch description since
> nothing gets converted to error_report here anymore...
>
>> Some of the prints in hw/sd/sd.c were manually converted to using
>> DPRINTF() instead.
>
> ... and just use the above sentence (in a maybe slightly adapted way).

Done in v8.

>> 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/sd/sd.c | 7 ++++---
>>  1 file changed, 4 insertions(+), 3 deletions(-)
>> 
>> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
>> index 35347a5bbc..73e405a04f 100644
>> --- a/hw/sd/sd.c
>> +++ b/hw/sd/sd.c
>> @@ -1564,9 +1564,10 @@ send_response:
>>      if (rsplen) {
>>          int i;
>>          DPRINTF("Response:");
>> -        for (i = 0; i < rsplen; i++)
>> -            fprintf(stderr, " %02x", response[i]);
>> -        fprintf(stderr, " state %d\n", sd->state);
>> +        for (i = 0; i < rsplen; i++) {
>> +            DPRINTF(" %02x", response[i]);
>> +        }
>> +        DPRINTF(" state %d\n", sd->state);
>>      } else {
>>          DPRINTF("No response %d\n", sd->state);
>>      }
>> 
>
> With the patch description updated:
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>

Thanks!

  reply	other threads:[~2018-02-05  6:27 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 [this message]
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=87vafcx86y.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=alistair.francis@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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 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.