[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: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 29/30] qdev: drop legacy hotplug fields/methods |
Date: |
Wed, 24 Sep 2014 14:04:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
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);
...
Still, this patch is okay.
Reviewed-by: Paolo Bonzini <address@hidden>
Paolo
- [Qemu-devel] [PATCH 27/30] usb-storage: drop not needed "allow_hotplug = 0", (continued)
- [Qemu-devel] [PATCH 27/30] usb-storage: drop not needed "allow_hotplug = 0", Igor Mammedov, 2014/09/24
- [Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API, Igor Mammedov, 2014/09/24
- Re: [Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API, Gerd Hoffmann, 2014/09/24
- Re: [Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API, Paolo Bonzini, 2014/09/24
- Re: [Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API, Gerd Hoffmann, 2014/09/24
- Re: [Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API, Igor Mammedov, 2014/09/24
- Re: [Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API, Gerd Hoffmann, 2014/09/25
- Re: [Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API, Igor Mammedov, 2014/09/24
- [Qemu-devel] [PATCH 29/30] qdev: drop legacy hotplug fields/methods, Igor Mammedov, 2014/09/24
- Re: [Qemu-devel] [PATCH 29/30] qdev: drop legacy hotplug fields/methods,
Paolo Bonzini <=
- [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