[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 108/126] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 108/126] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive() |
Date: |
Mon, 27 Feb 2023 15:01:55 +0100 |
ide_create_drive() operates on a IDEBus; rename it as
ide_bus_create_drive() to emphasize its first argument
is a IDEBus.
Mechanical change using:
$ sed -i -e 's/ide_create_drive/ide_bus_create_drive/g' \
$(git grep -wl ide_create_drive)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230215112712.23110-12-philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/arm/sbsa-ref.c | 2 +-
hw/ide/ahci.c | 2 +-
hw/ide/isa.c | 4 ++--
hw/ide/macio.c | 2 +-
hw/ide/microdrive.c | 2 +-
hw/ide/mmio.c | 4 ++--
hw/ide/pci.c | 2 +-
hw/ide/qdev.c | 2 +-
include/hw/ide/internal.h | 2 +-
9 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index f778cb6d09..0b93558dde 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -554,7 +554,7 @@ static void create_ahci(const SBSAMachineState *sms)
if (hd[i] == NULL) {
continue;
}
- ide_create_drive(&ahci->dev[i].port, 0, hd[i]);
+ ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]);
}
}
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 08c7ae6e3c..f338a55c4e 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1842,7 +1842,7 @@ void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd)
if (hd[i] == NULL) {
continue;
}
- ide_create_drive(&ahci->dev[i].port, 0, hd[i]);
+ ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]);
}
}
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index ad47e0899e..74f7b43137 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -93,10 +93,10 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int
iobase2, int irqnum,
s = ISA_IDE(dev);
if (hd0) {
- ide_create_drive(&s->bus, 0, hd0);
+ ide_bus_create_drive(&s->bus, 0, hd0);
}
if (hd1) {
- ide_create_drive(&s->bus, 1, hd1);
+ ide_bus_create_drive(&s->bus, 1, hd1);
}
return isadev;
}
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 24fb7a3f9d..7efbbc720a 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -501,7 +501,7 @@ void macio_ide_init_drives(MACIOIDEState *s, DriveInfo
**hd_table)
for (i = 0; i < 2; i++) {
if (hd_table[i]) {
- ide_create_drive(&s->bus, i, hd_table[i]);
+ ide_bus_create_drive(&s->bus, i, hd_table[i]);
}
}
}
diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
index b9822b939b..08504b499f 100644
--- a/hw/ide/microdrive.c
+++ b/hw/ide/microdrive.c
@@ -566,7 +566,7 @@ PCMCIACardState *dscm1xxxx_init(DriveInfo *dinfo)
qdev_realize(DEVICE(md), NULL, &error_fatal);
if (dinfo != NULL) {
- ide_create_drive(&md->bus, 0, dinfo);
+ ide_bus_create_drive(&md->bus, 0, dinfo);
}
md->bus.ifs[0].drive_kind = IDE_CFATA;
md->bus.ifs[0].mdata_size = METADATA_SIZE;
diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
index 6bf9048b1e..4e2c1a4413 100644
--- a/hw/ide/mmio.c
+++ b/hw/ide/mmio.c
@@ -174,10 +174,10 @@ void mmio_ide_init_drives(DeviceState *dev, DriveInfo
*hd0, DriveInfo *hd1)
MMIOIDEState *s = MMIO_IDE(dev);
if (hd0 != NULL) {
- ide_create_drive(&s->bus, 0, hd0);
+ ide_bus_create_drive(&s->bus, 0, hd0);
}
if (hd1 != NULL) {
- ide_create_drive(&s->bus, 1, hd1);
+ ide_bus_create_drive(&s->bus, 1, hd1);
}
}
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index ae638dee0d..4223f5e64d 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -489,7 +489,7 @@ void pci_ide_create_devs(PCIDevice *dev)
ide_drive_get(hd_table, ARRAY_SIZE(hd_table));
for (i = 0; i < 4; i++) {
if (hd_table[i]) {
- ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]);
+ ide_bus_create_drive(d->bus + bus[i], unit[i], hd_table[i]);
}
}
}
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 6f6c7462f3..1b3b4da01d 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -124,7 +124,7 @@ static void ide_qdev_realize(DeviceState *qdev, Error
**errp)
dc->realize(dev, errp);
}
-IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive)
+IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive)
{
DeviceState *dev;
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index 7b4b71d0b0..ccfe064643 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -645,7 +645,7 @@ void ide_atapi_cmd_reply_end(IDEState *s);
/* hw/ide/qdev.c */
void ide_bus_init(IDEBus *idebus, size_t idebus_size, DeviceState *dev,
int bus_id, int max_units);
-IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive);
+IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive);
int ide_handle_rw_error(IDEState *s, int error, int op);
--
2.38.1
- [PULL 099/126] hw/ide/mmio: Use CamelCase for MMIO_IDE state name, (continued)
- [PULL 099/126] hw/ide/mmio: Use CamelCase for MMIO_IDE state name, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 101/126] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h', Philippe Mathieu-Daudé, 2023/02/27
- [PULL 103/126] hw/ide/atapi: Restrict 'scsi/constants.h' inclusion, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 098/126] hw/ide/ahci: Trace ncq write command as write instead of read, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 100/126] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h', Philippe Mathieu-Daudé, 2023/02/27
- [PULL 102/126] hw/ide/isa: Remove intermediate ISAIDEState::irq variable, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 097/126] hw/i386/xen: Remove unused 'hw/ide.h' include from header, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 105/126] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h', Philippe Mathieu-Daudé, 2023/02/27
- [PULL 107/126] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq(), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 106/126] hw/ide: Un-inline ide_set_irq(), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 108/126] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive(),
Philippe Mathieu-Daudé <=
- [PULL 111/126] hw/ide: Rename ide_init2() -> ide_bus_init_output_irq(), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 112/126] hw/ide: Rename idebus_active_if() -> ide_bus_active_if(), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 116/126] hw/ide/piix: Remove unused includes, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 104/126] hw/ide: Remove unused 'qapi/qapi-types-run-state.h', Philippe Mathieu-Daudé, 2023/02/27
- [PULL 109/126] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 114/126] hw/ide/ioport: Remove unnecessary includes, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 115/126] hw/ide/pci: Unexport bmdma_active_if(), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 118/126] hw/ide/piix: Refactor pci_piix_init_ports as pci_piix_init_bus per bus, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 120/126] hw/ide/pci: Add PCIIDEState::isa_irq[], Philippe Mathieu-Daudé, 2023/02/27
- [PULL 123/126] dump: Clean included headers, Philippe Mathieu-Daudé, 2023/02/27