From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, "Eduardo Habkost" <eduardo@habkost.net>,
"John Snow" <jsnow@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"BALATON Zoltan" <balaton@eik.bme.hu>,
qemu-ppc@nongnu.org
Subject: [PATCH 12/20] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb
Date: Wed, 15 Feb 2023 12:27:04 +0100 [thread overview]
Message-ID: <20230215112712.23110-13-philmd@linaro.org> (raw)
In-Reply-To: <20230215112712.23110-1-philmd@linaro.org>
ide_register_restart_cb() operates on a IDEBus; rename it as
ide_bus_register_restart_cb() to emphasize its first argument
is a IDEBus.
Mechanical change using:
$ sed -i -e 's/ide_register_restart_cb/ide_bus_register_restart_cb/g' \
$(git grep -l ide_register_restart_cb)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ide/ahci.c | 2 +-
hw/ide/cmd646.c | 2 +-
hw/ide/core.c | 2 +-
hw/ide/isa.c | 2 +-
hw/ide/piix.c | 2 +-
hw/ide/sii3112.c | 2 +-
hw/ide/via.c | 2 +-
include/hw/ide/internal.h | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 90fea5d059..430961d73b 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1560,7 +1560,7 @@ void ahci_realize(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports)
ad->port_no = i;
ad->port.dma = &ad->dma;
ad->port.dma->ops = &ahci_dma_ops;
- ide_register_restart_cb(&ad->port);
+ ide_bus_register_restart_cb(&ad->port);
}
g_free(irqs);
}
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 94c576262c..2865bc25fc 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -298,7 +298,7 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp)
bmdma_init(&d->bus[i], &d->bmdma[i], d);
d->bmdma[i].bus = &d->bus[i];
- ide_register_restart_cb(&d->bus[i]);
+ ide_bus_register_restart_cb(&d->bus[i]);
}
}
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 117e26cef1..5897411b95 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2759,7 +2759,7 @@ static void ide_restart_cb(void *opaque, bool running, RunState state)
}
}
-void ide_register_restart_cb(IDEBus *bus)
+void ide_bus_register_restart_cb(IDEBus *bus)
{
if (bus->dma->ops->restart_dma) {
bus->vmstate = qemu_add_vm_change_state_handler(ide_restart_cb, bus);
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index 74f7b43137..f8ed26b587 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -74,7 +74,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **errp)
ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2);
ide_init2(&s->bus, isa_get_irq(isadev, s->irqnum));
vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s);
- ide_register_restart_cb(&s->bus);
+ ide_bus_register_restart_cb(&s->bus);
}
ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum,
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 267dbf37db..daeb9b605d 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -149,7 +149,7 @@ static int pci_piix_init_ports(PCIIDEState *d)
bmdma_init(&d->bus[i], &d->bmdma[i], d);
d->bmdma[i].bus = &d->bus[i];
- ide_register_restart_cb(&d->bus[i]);
+ ide_bus_register_restart_cb(&d->bus[i]);
}
return 0;
diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c
index 46204f10d7..c918370220 100644
--- a/hw/ide/sii3112.c
+++ b/hw/ide/sii3112.c
@@ -288,7 +288,7 @@ static void sii3112_pci_realize(PCIDevice *dev, Error **errp)
bmdma_init(&s->bus[i], &s->bmdma[i], s);
s->bmdma[i].bus = &s->bus[i];
- ide_register_restart_cb(&s->bus[i]);
+ ide_bus_register_restart_cb(&s->bus[i]);
}
}
diff --git a/hw/ide/via.c b/hw/ide/via.c
index e1a429405d..fd398226d4 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -195,7 +195,7 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
bmdma_init(&d->bus[i], &d->bmdma[i], d);
d->bmdma[i].bus = &d->bus[i];
- ide_register_restart_cb(&d->bus[i]);
+ ide_bus_register_restart_cb(&d->bus[i]);
}
}
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index ccfe064643..cc95cd47a0 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -620,7 +620,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq);
void ide_exit(IDEState *s);
int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2);
void ide_bus_set_irq(IDEBus *bus);
-void ide_register_restart_cb(IDEBus *bus);
+void ide_bus_register_restart_cb(IDEBus *bus);
void ide_exec_cmd(IDEBus *bus, uint32_t val);
--
2.38.1
next prev parent reply other threads:[~2023-02-15 11:28 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 11:26 [PATCH 00/20] hw/ide: QOM/QDev housekeeping Philippe Mathieu-Daudé
2023-02-15 11:26 ` [PATCH 01/20] MAINTAINERS: Mark IDE and Floppy as "Odd Fixes" Philippe Mathieu-Daudé
2023-02-15 17:27 ` Alex Bennée
2023-02-15 20:51 ` Philippe Mathieu-Daudé
2023-02-15 11:26 ` [PATCH 02/20] hw/ide/mmio: Use CamelCase for MMIO_IDE state name Philippe Mathieu-Daudé
2023-02-15 17:29 ` Alex Bennée
2023-02-15 11:26 ` [PATCH 03/20] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h' Philippe Mathieu-Daudé
2023-02-15 17:32 ` Alex Bennée
2023-02-15 19:06 ` Richard Henderson
2023-02-15 11:26 ` [PATCH 04/20] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h' Philippe Mathieu-Daudé
2023-02-15 19:08 ` Richard Henderson
2023-02-16 14:19 ` Bernhard Beschow
2023-02-15 11:26 ` [PATCH 05/20] hw/ide/isa: Remove intermediate ISAIDEState::irq variable Philippe Mathieu-Daudé
2023-02-15 17:54 ` Bernhard Beschow
2023-02-15 19:08 ` Richard Henderson
2023-02-15 11:26 ` [PATCH 06/20] hw/ide/atapi: Restrict 'scsi/constants.h' inclusion Philippe Mathieu-Daudé
2023-02-15 19:09 ` Richard Henderson
2023-02-15 11:26 ` [PATCH 07/20] hw/ide: Remove unused 'qapi/qapi-types-run-state.h' Philippe Mathieu-Daudé
2023-02-15 19:09 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 08/20] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h' Philippe Mathieu-Daudé
2023-02-15 19:09 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 09/20] hw/ide: Un-inline ide_set_irq() Philippe Mathieu-Daudé
2023-02-15 19:11 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 10/20] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq() Philippe Mathieu-Daudé
2023-02-15 19:12 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 11/20] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive() Philippe Mathieu-Daudé
2023-02-15 19:13 ` Richard Henderson
2023-02-15 11:27 ` Philippe Mathieu-Daudé [this message]
2023-02-15 19:13 ` [PATCH 12/20] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb Richard Henderson
2023-02-15 11:27 ` [PATCH 13/20] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() Philippe Mathieu-Daudé
2023-02-15 19:14 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 14/20] hw/ide: Rename ide_init2() -> ide_bus_init_output_irq() Philippe Mathieu-Daudé
2023-02-15 15:40 ` Philippe Mathieu-Daudé
2023-02-15 19:15 ` Richard Henderson
2023-02-16 0:10 ` Bernhard Beschow
2023-02-15 11:27 ` [PATCH 15/20] hw/ide: Rename idebus_active_if() -> ide_bus_active_if() Philippe Mathieu-Daudé
2023-02-15 19:16 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 16/20] hw/ide/ioport: Remove unnecessary includes Philippe Mathieu-Daudé
2023-02-15 19:17 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 17/20] hw/ide/pci: Unexport bmdma_active_if() Philippe Mathieu-Daudé
2023-02-15 18:13 ` Bernhard Beschow
2023-02-15 21:09 ` BALATON Zoltan
2023-02-16 0:18 ` Bernhard Beschow
2023-02-16 0:33 ` Bernhard Beschow
2023-02-15 19:17 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 18/20] hw/ide/piix: Remove unused includes Philippe Mathieu-Daudé
2023-02-15 19:18 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 19/20] hw/ide/piix: Pass Error* to pci_piix_init_ports() for better error msg Philippe Mathieu-Daudé
2023-02-15 19:20 ` Richard Henderson
2023-02-15 11:27 ` [PATCH 20/20] hw/ide/piix: Refactor pci_piix_init_ports as pci_piix_init_bus per bus Philippe Mathieu-Daudé
2023-02-15 19:21 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230215112712.23110-13-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=balaton@eik.bme.hu \
--cc=eduardo@habkost.net \
--cc=jsnow@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).