[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 1/6] hw/sd/milkymist-memcard: use qemu_log_mask()
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-arm] [PATCH 1/6] hw/sd/milkymist-memcard: use qemu_log_mask() |
Date: |
Fri, 5 Jan 2018 09:34:35 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
I'm too comfortable with the 'log' trace backend and again forgot to add
the "qemu/log.h" dependency ...
/home/travis/build/philmd/qemu/hw/sd/milkymist-memcard.c:141:17: error:
implicit declaration of function ‘qemu_log_mask’
[-Werror=implicit-function-declaration]
qemu_log_mask(LOG_GUEST_ERROR, "milkymist_memcard: "
^
hw/sd/milkymist-memcard.c:141:31: error: ‘LOG_GUEST_ERROR’ undeclared
(first use in this function)
qemu_log_mask(LOG_GUEST_ERROR, "milkymist_memcard: "
^
hw/sd/milkymist-memcard.c:166:23: error: ‘LOG_UNIMP’ undeclared (first
use in this function)
qemu_log_mask(LOG_UNIMP, "milkymist_memcard: "
^
On 01/03/2018 01:23 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> hw/sd/milkymist-memcard.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
> index 4008c81002..5de3e00e2f 100644
> --- a/hw/sd/milkymist-memcard.c
> +++ b/hw/sd/milkymist-memcard.c
> @@ -26,7 +26,7 @@
> #include "hw/sysbus.h"
> #include "sysemu/sysemu.h"
> #include "trace.h"
> -#include "qemu/error-report.h"
> +#include "include/qapi/error.h"
> #include "sysemu/block-backend.h"
> #include "sysemu/blockdev.h"
> #include "hw/sd/sd.h"
> @@ -138,8 +138,8 @@ static uint64_t memcard_read(void *opaque, hwaddr addr,
> } else {
> r = s->response[s->response_read_ptr++];
> if (s->response_read_ptr > s->response_len) {
> - error_report("milkymist_memcard: "
> - "read more cmd bytes than available. Clipping.");
> + qemu_log_mask(LOG_GUEST_ERROR, "milkymist_memcard: "
> + "read more cmd bytes than available.
> Clipping.");
> s->response_read_ptr = 0;
> }
> }
> @@ -163,8 +163,9 @@ static uint64_t memcard_read(void *opaque, hwaddr addr,
> break;
>
> default:
> - error_report("milkymist_memcard: read access to unknown register 0x"
> - TARGET_FMT_plx, addr << 2);
> + qemu_log_mask(LOG_UNIMP, "milkymist_memcard: "
> + "read access to unknown register 0x%" HWADDR_PRIx "\n",
> + addr << 2);
> break;
> }
>
> @@ -220,8 +221,9 @@ static void memcard_write(void *opaque, hwaddr addr,
> uint64_t value,
> break;
>
> default:
> - error_report("milkymist_memcard: write access to unknown register 0x"
> - TARGET_FMT_plx, addr << 2);
> + qemu_log_mask(LOG_UNIMP, "milkymist_memcard: "
> + "write access to unknown register 0x%" HWADDR_PRIx " "
> + "(value 0x%" PRIx64 ")\n", addr << 2, value);
> break;
> }
> }
>
- [Qemu-arm] [PATCH 0/6] SDHCI: convert legacy devices to the SDBus API, Philippe Mathieu-Daudé, 2018/01/03
- [Qemu-arm] [PATCH 3/6] hw/sd/milkymist-memcard: expose a SDBus and connect the SDCard to it, Philippe Mathieu-Daudé, 2018/01/03
- [Qemu-arm] [PATCH 4/6] hw/sd/pl181: expose a SDBus and connect the SDCard to it, Philippe Mathieu-Daudé, 2018/01/03
- [Qemu-arm] [PATCH 6/6] hw/sd: move sdcard legacy API to "hw/sd/sdcard_legacy.h", Philippe Mathieu-Daudé, 2018/01/03
- [Qemu-arm] [PATCH 1/6] hw/sd/milkymist-memcard: use qemu_log_mask(), Philippe Mathieu-Daudé, 2018/01/03
- [Qemu-arm] [PATCH 2/6] hw/sd/milkymist-memcard: split realize() out of SysBusDevice init(), Philippe Mathieu-Daudé, 2018/01/03
- [Qemu-arm] [PATCH 5/6] hw/sd/ssi-sd: expose a SDBus and connect the SDCard to it, Philippe Mathieu-Daudé, 2018/01/03