diff options
author | Alistair Francis <alistair.francis@xilinx.com> | 2017-12-20 09:24:47 -0800 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-08-21 16:22:43 +0200 |
commit | 4858e256bd475cdb68f61daa1083a562ecf9faec (patch) | |
tree | a4083f6292cb20f4494f112033a4650853a3e2f6 /hw/sd | |
parent | a8c73ca21a6f86daa53c2dbeeb8abf06dd1aeec9 (diff) |
hw/sd/pl181: Replace fprintf(stderr, "*\n") with error_report()
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.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Message-Id: <488ba8d4c562ea44119de8ea0f385a898bd8fa1e.1513790495.git.alistair.francis@xilinx.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/sd')
-rw-r--r-- | hw/sd/pl181.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c index 2b3776a6a0..649386ec3d 100644 --- a/hw/sd/pl181.c +++ b/hw/sd/pl181.c @@ -15,6 +15,7 @@ #include "hw/sd/sd.h" #include "qemu/log.h" #include "qemu/module.h" +#include "qemu/error-report.h" #include "qapi/error.h" //#define DEBUG_PL181 1 @@ -148,7 +149,7 @@ static void pl181_fifo_push(PL181State *s, uint32_t value) int n; if (s->fifo_len == PL181_FIFO_LEN) { - fprintf(stderr, "pl181: FIFO overflow\n"); + error_report("%s: FIFO overflow", __func__); return; } n = (s->fifo_pos + s->fifo_len) & (PL181_FIFO_LEN - 1); @@ -162,7 +163,7 @@ static uint32_t pl181_fifo_pop(PL181State *s) uint32_t value; if (s->fifo_len == 0) { - fprintf(stderr, "pl181: FIFO underflow\n"); + error_report("%s: FIFO underflow", __func__); return 0; } value = s->fifo[s->fifo_pos]; |