diff mbox series

[v2,01/18] hw/isa: Rename isa_get_dma() -> isa_bus_get_dma()

Message ID 20230215161641.32663-2-philmd@linaro.org
State New
Headers show
Series hw/ide: Untangle ISA/PCI abuses of ide_init_ioport() | expand

Commit Message

Philippe Mathieu-Daudé Feb. 15, 2023, 4:16 p.m. UTC
isa_get_dma() returns a DMA channel handler from an ISABus.
To emphasize this, rename it as isa_bus_get_dma().

Mechanical change using:

  $ sed -i -e 's/isa_get_dma/isa_bus_get_dma/g' \
        $(git grep -l isa_get_dma)

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/audio/cs4231a.c   | 2 +-
 hw/audio/gus.c       | 2 +-
 hw/audio/sb16.c      | 4 ++--
 hw/block/fdc-isa.c   | 2 +-
 hw/dma/i82374.c      | 2 +-
 hw/isa/isa-bus.c     | 2 +-
 include/hw/isa/isa.h | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

Comments

Thomas Huth Feb. 24, 2023, 8:42 a.m. UTC | #1
On 15/02/2023 17.16, Philippe Mathieu-Daudé wrote:
> isa_get_dma() returns a DMA channel handler from an ISABus.
> To emphasize this, rename it as isa_bus_get_dma().
> 
> Mechanical change using:
> 
>    $ sed -i -e 's/isa_get_dma/isa_bus_get_dma/g' \
>          $(git grep -l isa_get_dma)
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/audio/cs4231a.c   | 2 +-
>   hw/audio/gus.c       | 2 +-
>   hw/audio/sb16.c      | 4 ++--
>   hw/block/fdc-isa.c   | 2 +-
>   hw/dma/i82374.c      | 2 +-
>   hw/isa/isa-bus.c     | 2 +-
>   include/hw/isa/isa.h | 2 +-
>   7 files changed, 8 insertions(+), 8 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c
index 7f17a72a9c..ec066fcd89 100644
--- a/hw/audio/cs4231a.c
+++ b/hw/audio/cs4231a.c
@@ -671,7 +671,7 @@  static void cs4231a_realizefn (DeviceState *dev, Error **errp)
     CSState *s = CS4231A (dev);
     IsaDmaClass *k;
 
-    s->isa_dma = isa_get_dma(isa_bus_from_device(d), s->dma);
+    s->isa_dma = isa_bus_get_dma(isa_bus_from_device(d), s->dma);
     if (!s->isa_dma) {
         error_setg(errp, "ISA controller does not support DMA");
         return;
diff --git a/hw/audio/gus.c b/hw/audio/gus.c
index 42f010b671..2a08a0f7d7 100644
--- a/hw/audio/gus.c
+++ b/hw/audio/gus.c
@@ -240,7 +240,7 @@  static void gus_realizefn (DeviceState *dev, Error **errp)
     IsaDmaClass *k;
     struct audsettings as;
 
-    s->isa_dma = isa_get_dma(isa_bus_from_device(d), s->emu.gusdma);
+    s->isa_dma = isa_bus_get_dma(isa_bus_from_device(d), s->emu.gusdma);
     if (!s->isa_dma) {
         error_setg(errp, "ISA controller does not support DMA");
         return;
diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c
index 2215386ddb..ae745c7283 100644
--- a/hw/audio/sb16.c
+++ b/hw/audio/sb16.c
@@ -1401,8 +1401,8 @@  static void sb16_realizefn (DeviceState *dev, Error **errp)
     SB16State *s = SB16 (dev);
     IsaDmaClass *k;
 
-    s->isa_hdma = isa_get_dma(isa_bus_from_device(isadev), s->hdma);
-    s->isa_dma = isa_get_dma(isa_bus_from_device(isadev), s->dma);
+    s->isa_hdma = isa_bus_get_dma(isa_bus_from_device(isadev), s->hdma);
+    s->isa_dma = isa_bus_get_dma(isa_bus_from_device(isadev), s->dma);
     if (!s->isa_dma || !s->isa_hdma) {
         error_setg(errp, "ISA controller does not support DMA");
         return;
diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c
index fee1ca68a8..a5f07b668d 100644
--- a/hw/block/fdc-isa.c
+++ b/hw/block/fdc-isa.c
@@ -98,7 +98,7 @@  static void isabus_fdc_realize(DeviceState *dev, Error **errp)
     fdctrl->dma_chann = isa->dma;
     if (fdctrl->dma_chann != -1) {
         IsaDmaClass *k;
-        fdctrl->dma = isa_get_dma(isa_bus_from_device(isadev), isa->dma);
+        fdctrl->dma = isa_bus_get_dma(isa_bus_from_device(isadev), isa->dma);
         if (!fdctrl->dma) {
             error_setg(errp, "ISA controller does not support DMA");
             return;
diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c
index 34c3aaf7d3..63734c22c9 100644
--- a/hw/dma/i82374.c
+++ b/hw/dma/i82374.c
@@ -125,7 +125,7 @@  static void i82374_realize(DeviceState *dev, Error **errp)
     I82374State *s = I82374(dev);
     ISABus *isa_bus = isa_bus_from_device(ISA_DEVICE(dev));
 
-    if (isa_get_dma(isa_bus, 0)) {
+    if (isa_bus_get_dma(isa_bus, 0)) {
         error_setg(errp, "DMA already initialized on ISA bus");
         return;
     }
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index f155b80010..39111f74cc 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -99,7 +99,7 @@  void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16)
     bus->dma[1] = dma16;
 }
 
-IsaDma *isa_get_dma(ISABus *bus, int nchan)
+IsaDma *isa_bus_get_dma(ISABus *bus, int nchan)
 {
     assert(bus);
     return bus->dma[nchan > 3 ? 1 : 0];
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index 25acd5c34c..029d6e90bf 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -77,7 +77,7 @@  void isa_bus_irqs(ISABus *bus, qemu_irq *irqs);
 qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq);
 void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq);
 void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16);
-IsaDma *isa_get_dma(ISABus *bus, int nchan);
+IsaDma *isa_bus_get_dma(ISABus *bus, int nchan);
 MemoryRegion *isa_address_space(ISADevice *dev);
 MemoryRegion *isa_address_space_io(ISADevice *dev);
 ISADevice *isa_new(const char *name);