[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/19] hw/ide/qdev: Replace DO_UPCAST(IDEDevice) by IDE_DEVICE()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 06/19] hw/ide/qdev: Replace DO_UPCAST(IDEDevice) by IDE_DEVICE() |
Date: |
Sun, 12 Feb 2023 23:51:31 +0100 |
Use the IDE_DEVICE() QOM type-checking macro to avoid DO_UPCAST().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ide/qdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 96582ce49b..c96a25e955 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -133,7 +133,7 @@ IDEDevice *ide_create_drive(IDEBus *bus, int unit,
DriveInfo *drive)
qdev_prop_set_drive_err(dev, "drive", blk_by_legacy_dinfo(drive),
&error_fatal);
qdev_realize_and_unref(dev, &bus->qbus, &error_fatal);
- return DO_UPCAST(IDEDevice, qdev, dev);
+ return IDE_DEVICE(dev);
}
int ide_get_geometry(BusState *bus, int unit,
--
2.38.1
- [PATCH 00/19] hw: Use QOM macros and remove DO_UPCAST() uses, Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 01/19] hw/char/serial-pci: Replace DO_UPCAST(PCISerialState) by PCI_SERIAL(), Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 02/19] hw/char/serial-pci-multi: Batch register types using DEFINE_TYPES macro, Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 03/19] hw/char/serial-pci-multi: Introduce PCI_MULTISERIAL QOM abstract parent, Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 04/19] hw/char/serial-pci-multi: Factor multi_serial_class_initfn() out, Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 05/19] hw/char/serial-pci-multi: Replace DO_UPCAST() by PCI_MULTISERIAL(), Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 06/19] hw/ide/qdev: Replace DO_UPCAST(IDEDevice) by IDE_DEVICE(),
Philippe Mathieu-Daudé <=
- [PATCH 07/19] hw/ide/qdev: Replace DO_UPCAST(IDEBus) by IDE_BUS(), Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 08/19] hw/net/eepro100: Introduce TYPE_EEPRO100 QOM abstract parent, Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 09/19] hw/net/eepro100: Replace DO_UPCAST(EEPRO100State) by EEPRO100(), Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 10/19] hw/net/ne2000-pci: Replace DO_UPCAST(PCINE2000State) by PCI_NE2000(), Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 11/19] hw/net/tulip: Finish QOM conversion, Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 12/19] hw/pci/pci: Replace DO_UPCAST(PCIBus) by PCI_BUS(), Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 14/19] hw/scsi/scsi-bus: Inline two uses of scsi_bus_from_device(), Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 13/19] hw/scsi/scsi-bus: Replace DO_UPCAST(SCSIBus) by SCSI_BUS(), Philippe Mathieu-Daudé, 2023/02/12
- [PATCH 15/19] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT(), Philippe Mathieu-Daudé, 2023/02/12