[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 29/30] qdev: drop legacy hotplug fields/methods
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 29/30] qdev: drop legacy hotplug fields/methods |
Date: |
Wed, 24 Sep 2014 17:37:40 +0200 |
On Wed, 24 Sep 2014 14:04:46 +0200
Paolo Bonzini <address@hidden> wrote:
> Il 24/09/2014 13:48, Igor Mammedov ha scritto:
> > @@ -239,10 +239,7 @@ void qdev_unplug(DeviceState *dev, Error **errp)
> > hotplug_handler_unplug(dev->parent_bus->hotplug_handler, dev,
> > errp);
> > }
> > } else {
> > - assert(dc->unplug != NULL);
> > - if (dc->unplug(dev) < 0) { /* legacy handler */
> > - error_set(errp, QERR_UNDEFINED_ERROR);
> > - }
> > + assert(0);
> > }
>
> This is not particularly nice, but it makes sense at this part of the
> series, since an
>
> assert(dev->parent_bus && dev->parent_bus->hotplug_handler);
>
> would be changed immediately in the next patch. Also, it would change
> indentation and make the patch bigger. Hence, please consider adding a
> 31st patch that changes
>
> hotplug_ctrl = qdev_get_hotplug_handler(dev);
> if (hotplug_ctrl) {
> ...
> } else {
> assert(0);
> }
>
> to
>
> hotplug_ctrl = qdev_get_hotplug_handler(dev);
> assert(hotplug_ctrl);
sure, I'll add extra patch
> ...
>
> Still, this patch is okay.
>
> Reviewed-by: Paolo Bonzini <address@hidden>
>
> Paolo
[Qemu-devel] [PATCH 29/30] qdev: drop legacy hotplug fields/methods, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 03/30] test: virtio-rng: check if hot-plug/unplug works, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 11/30] qdev: HotplugHandler: provide unplug callback, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 05/30] test: virtio-blk: check if hot-plug/unplug works, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 06/30] test: usb: add port test to uhci unit test, Igor Mammedov, 2014/09/24