[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 21/23] hw/riscv: Emit warning when old code is used
From: |
Alistair Francis |
Subject: |
Re: [RFC PATCH v2 21/23] hw/riscv: Emit warning when old code is used |
Date: |
Mon, 6 Jul 2020 09:46:42 -0700 |
On Sat, Jul 4, 2020 at 8:48 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> This code hasn't been QOM'ified yet. Warn the user.
>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> hw/riscv/riscv_htif.c | 4 ++++
> hw/riscv/sifive_uart.c | 4 ++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/hw/riscv/riscv_htif.c b/hw/riscv/riscv_htif.c
> index ca87a5cf9f..bd080dbefb 100644
> --- a/hw/riscv/riscv_htif.c
> +++ b/hw/riscv/riscv_htif.c
> @@ -30,6 +30,7 @@
> #include "hw/riscv/riscv_htif.h"
> #include "qemu/timer.h"
> #include "qemu/error-report.h"
> +#include "hw/qdev-deprecated.h"
>
> #define RISCV_DEBUG_HTIF 0
> #define HTIF_DEBUG(fmt, ...)
> \
> @@ -238,6 +239,9 @@ HTIFState *htif_mm_init(MemoryRegion *address_space,
> MemoryRegion *main_mem,
> uint64_t fromhost_offset = fromhost_addr - base;
>
> HTIFState *s = g_malloc0(sizeof(HTIFState));
> +
> + qdev_warn_deprecated_function_used();
> +
> s->address_space = address_space;
> s->main_mem = main_mem;
> s->main_mem_ram_ptr = memory_region_get_ram_ptr(main_mem);
> diff --git a/hw/riscv/sifive_uart.c b/hw/riscv/sifive_uart.c
> index 9350482662..1a5890d5f7 100644
> --- a/hw/riscv/sifive_uart.c
> +++ b/hw/riscv/sifive_uart.c
> @@ -25,6 +25,7 @@
> #include "hw/hw.h"
> #include "hw/irq.h"
> #include "hw/riscv/sifive_uart.h"
> +#include "hw/qdev-deprecated.h"
>
> /*
> * Not yet implemented:
> @@ -183,6 +184,9 @@ SiFiveUARTState *sifive_uart_create(MemoryRegion
> *address_space, hwaddr base,
> Chardev *chr, qemu_irq irq)
> {
> SiFiveUARTState *s = g_malloc0(sizeof(SiFiveUARTState));
> +
> + qdev_warn_deprecated_function_used();
> +
> s->irq = irq;
> qemu_chr_fe_init(&s->chr, chr, &error_abort);
> qemu_chr_fe_set_handlers(&s->chr, uart_can_rx, uart_rx, uart_event,
> --
> 2.21.3
>
>
- [RFC PATCH v2 14/23] hw/input/tsc2005: Emit warning when old code is used, (continued)
- [RFC PATCH v2 14/23] hw/input/tsc2005: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04
- [RFC PATCH v2 15/23] hw/m68k/mcf520x: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04
- [RFC PATCH v2 16/23] hw/misc/cbus: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04
- [RFC PATCH v2 17/23] hw/nvram/eeprom93xx: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04
- [RFC PATCH v2 18/23] hw/openrisc/cputimer: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04
- [RFC PATCH v2 19/23] hw/ppc/ppc4xx: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04
- [RFC PATCH v2 20/23] hw/sh4: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04
- [RFC PATCH v2 21/23] hw/riscv: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04
- Re: [RFC PATCH v2 21/23] hw/riscv: Emit warning when old code is used,
Alistair Francis <=
- [RFC PATCH v2 22/23] hw/usb/hcd-musb: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04
- [RFC PATCH v2 23/23] hw/xtensa/xtfpga: Emit warning when old code is used, Philippe Mathieu-Daudé, 2020/07/04