qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/9] hw/misc/empty_slot: Add a qdev property 'na


From: Artyom Tarasenko
Subject: Re: [Qemu-devel] [PATCH 5/9] hw/misc/empty_slot: Add a qdev property 'name'
Date: Tue, 25 Jun 2019 09:05:32 +0200

On Tue, Jun 25, 2019 at 12:01 AM Philippe Mathieu-Daudé <address@hidden> wrote:
>
> If few commits empty_slot_init() will take 'name' as argument.
> Meanwhile, initialize it as 'empty-slot'.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>

Reviewed-by: Artyom Tarasenko <address@hidden>

> ---
>  hw/misc/empty_slot.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/hw/misc/empty_slot.c b/hw/misc/empty_slot.c
> index ef0a7b99ba..c32241a9e5 100644
> --- a/hw/misc/empty_slot.c
> +++ b/hw/misc/empty_slot.c
> @@ -32,6 +32,7 @@ typedef struct EmptySlot {
>      SysBusDevice parent_obj;
>
>      MemoryRegion iomem;
> +    char *name;
>      uint64_t size;
>  } EmptySlot;
>
> @@ -78,14 +79,18 @@ static void empty_slot_realize(DeviceState *dev, Error 
> **errp)
>          error_setg(errp, "property 'size' not specified or zero");
>          return;
>      }
> +    if (s->name == NULL) {
> +        s->name = g_strdup("empty-slot");
> +    }
>
>      memory_region_init_io(&s->iomem, OBJECT(s), &empty_slot_ops, s,
> -                          "empty-slot", s->size);
> +                          s->name, s->size);
>      sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
>  }
>
>  static Property empty_slot_properties[] = {
>      DEFINE_PROP_UINT64("size", EmptySlot, size, 0),
> +    DEFINE_PROP_STRING("name", EmptySlot, name),
>      DEFINE_PROP_END_OF_LIST(),
>  };
>
> --
> 2.19.1
>


-- 
Regards,
Artyom Tarasenko

SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]