[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-arm] [PATCH 09/19] hw/misc/unimp: Move struct to
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [Qemu-arm] [PATCH 09/19] hw/misc/unimp: Move struct to header file |
Date: |
Tue, 20 Feb 2018 15:27:04 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/20/2018 03:03 PM, Peter Maydell wrote:
> Move the definition of the struct for the unimplemented-device
> from unimp.c to unimp.h, so that users can embed the struct
> in their own device structs if they prefer.
>
> Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> include/hw/misc/unimp.h | 10 ++++++++++
> hw/misc/unimp.c | 10 ----------
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/include/hw/misc/unimp.h b/include/hw/misc/unimp.h
> index 52e068ec3e..2a291ca42d 100644
> --- a/include/hw/misc/unimp.h
> +++ b/include/hw/misc/unimp.h
> @@ -12,6 +12,16 @@
>
> #define TYPE_UNIMPLEMENTED_DEVICE "unimplemented-device"
>
> +#define UNIMPLEMENTED_DEVICE(obj) \
> + OBJECT_CHECK(UnimplementedDeviceState, (obj), TYPE_UNIMPLEMENTED_DEVICE)
> +
> +typedef struct {
> + SysBusDevice parent_obj;
> + MemoryRegion iomem;
> + char *name;
> + uint64_t size;
> +} UnimplementedDeviceState;
> +
> /**
> * create_unimplemented_device: create and map a dummy device
> * @name: name of the device for debug logging
> diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c
> index bcbb585888..1c0ba2f0a7 100644
> --- a/hw/misc/unimp.c
> +++ b/hw/misc/unimp.c
> @@ -18,16 +18,6 @@
> #include "qemu/log.h"
> #include "qapi/error.h"
>
> -#define UNIMPLEMENTED_DEVICE(obj) \
> - OBJECT_CHECK(UnimplementedDeviceState, (obj), TYPE_UNIMPLEMENTED_DEVICE)
> -
> -typedef struct {
> - SysBusDevice parent_obj;
> - MemoryRegion iomem;
> - char *name;
> - uint64_t size;
> -} UnimplementedDeviceState;
> -
> static uint64_t unimp_read(void *opaque, hwaddr offset, unsigned size)
> {
> UnimplementedDeviceState *s = UNIMPLEMENTED_DEVICE(opaque);
>
- [Qemu-devel] [PATCH 00/19] Add Cortex-M33 and mps2-an505 board model, Peter Maydell, 2018/02/20
- [Qemu-devel] [PATCH 11/19] qdev: Add new qdev_init_gpio_in_named_with_opaque(), Peter Maydell, 2018/02/20
- [Qemu-devel] [PATCH 10/19] include/hw/or-irq.h: Add missing include guard, Peter Maydell, 2018/02/20
- [Qemu-devel] [PATCH 09/19] hw/misc/unimp: Move struct to header file, Peter Maydell, 2018/02/20
- [Qemu-devel] [PATCH 08/19] target/arm: Add Cortex-M33, Peter Maydell, 2018/02/20
- [Qemu-devel] [PATCH 01/19] loader: Add new load_ramdisk_as(), Peter Maydell, 2018/02/20
- [Qemu-devel] [PATCH 17/19] hw/misc/iotkit-secctl: Add remaining simple registers, Peter Maydell, 2018/02/20
- [Qemu-devel] [PATCH 15/19] hw/misc/iotkit-secctl: Arm IoT Kit security controller initial skeleton, Peter Maydell, 2018/02/20
- [Qemu-devel] [PATCH 03/19] hw/arm/armv7m: Honour CPU's address space for image loads, Peter Maydell, 2018/02/20