Re: [Qemu-devel] [PATCH 13/30] qdev: hotplug: set handler only if HOTPLUG_HANDLER interface is supported

2014-09-24 Thread Tang Chen
On 09/24/2014 07:48 PM, Igor Mammedov wrote: Check if 'handler' implements HOTPLUG_HANDLER interface before setting it, if it's not then do nothing and leave bus not hotpluggable. That would allow to reuse the same code for creating bus for example 'scsi_bus_new()' for both hotpluggable and not

Re: [Qemu-devel] [PATCH 13/30] qdev: hotplug: set handler only if HOTPLUG_HANDLER interface is supported

2014-09-24 Thread Igor Mammedov
On Wed, 24 Sep 2014 14:19:06 +0200 Paolo Bonzini wrote: > Il 24/09/2014 13:48, Igor Mammedov ha scritto: > > Check if 'handler' implements HOTPLUG_HANDLER interface > > before setting it, if it's not then do nothing and leave > > bus not hotpluggable. > > > > That would allow to reuse the same c

Re: [Qemu-devel] [PATCH 13/30] qdev: hotplug: set handler only if HOTPLUG_HANDLER interface is supported

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 13:48, Igor Mammedov ha scritto: > Check if 'handler' implements HOTPLUG_HANDLER interface > before setting it, if it's not then do nothing and leave > bus not hotpluggable. > > That would allow to reuse the same code for creating bus > for example 'scsi_bus_new()' for both hotplugga

[Qemu-devel] [PATCH 13/30] qdev: hotplug: set handler only if HOTPLUG_HANDLER interface is supported

2014-09-24 Thread Igor Mammedov
Check if 'handler' implements HOTPLUG_HANDLER interface before setting it, if it's not then do nothing and leave bus not hotpluggable. That would allow to reuse the same code for creating bus for example 'scsi_bus_new()' for both hotpluggable and not hotpluggable controllers. Signed-off-by: Igor