[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] Pointer properties and device_add
From: |
Marcel Apfelbaum |
Subject: |
Re: [Qemu-devel] [PATCH 0/2] Pointer properties and device_add |
Date: |
Sun, 01 Dec 2013 15:13:50 +0200 |
On Fri, 2013-11-29 at 10:43 +0100, address@hidden wrote:
> From: Markus Armbruster <address@hidden>
>
> Pointer properties can be set only by code, not by device_add. A
> device with a pointer property can't work with device_add only unless
> the property may remain null. cannot_instantiate_with_device_add_yet
> needs to be set then. PATCH 1/2 sets it when needed and else
> documents why not. PATCH 2/2 documents this for future users of
> pointer properties.
>
> This applies on top of my "[PATCH v4 00/10] Clean up and fix no_user"
> series.
Even that I am not familiar with this code, I've checked all the changes
and I agree with them.
Reviewed-by: Marcel Apfelbaum <address@hidden>
Anyway, I do have a question:
Why not asserting on qdev_device_add if we have a pointer property?
Instead of checking only cannot_instantiate_with_device_add_yet,
we can go over properties and if we have a pointer property, assert or
return...
Thanks,
Marcel
>
> Markus Armbruster (2):
> hw: cannot_instantiate_with_device_add_yet due to pointer props
> qdev: Document that pointer properties kill device_add
>
> hw/audio/marvell_88w8618.c | 2 ++
> hw/dma/sparc32_dma.c | 2 ++
> hw/gpio/omap_gpio.c | 4 ++++
> hw/i2c/omap_i2c.c | 2 ++
> hw/i2c/smbus_eeprom.c | 2 ++
> hw/intc/etraxfs_pic.c | 4 ++++
> hw/intc/grlib_irqmp.c | 2 ++
> hw/intc/omap_intc.c | 4 ++++
> hw/net/etraxfs_eth.c | 2 ++
> hw/net/lance.c | 2 ++
> include/hw/qdev-properties.h | 17 +++++++++++++++++
> 11 files changed, 43 insertions(+)
>
- Re: [Qemu-devel] [PATCH 0/2] Pointer properties and device_add,
Marcel Apfelbaum <=