[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/20] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 13/20] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() |
Date: |
Wed, 15 Feb 2023 12:27:05 +0100 |
ide_exec_cmd() operates on a IDEBus; rename it as
ide_bus_exec_cmd() to emphasize its first argument
is a IDEBus.
Mechanical change using:
$ sed -i -e 's/ide_exec_cmd/ide_bus_exec_cmd/g' \
$(git grep -wl ide_exec_cmd)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ide/ahci.c | 2 +-
hw/ide/core.c | 6 +++---
hw/ide/trace-events | 2 +-
include/hw/ide/internal.h | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 430961d73b..7f67fb3119 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1269,7 +1269,7 @@ static void handle_reg_h2d_fis(AHCIState *s, int port,
cmd->status = 0;
/* We're ready to process the command in FIS byte 2. */
- ide_exec_cmd(&s->dev[port].port, cmd_fis[2]);
+ ide_bus_exec_cmd(&s->dev[port].port, cmd_fis[2]);
}
static int handle_cmd(AHCIState *s, int port, uint8_t slot)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 5897411b95..1be0731d1a 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1327,7 +1327,7 @@ void ide_ioport_write(void *opaque, uint32_t addr,
uint32_t val)
case ATA_IOPORT_WR_COMMAND:
ide_clear_hob(bus);
qemu_irq_lower(bus->irq);
- ide_exec_cmd(bus, val);
+ ide_bus_exec_cmd(bus, val);
break;
}
}
@@ -2123,13 +2123,13 @@ static bool ide_cmd_permitted(IDEState *s, uint32_t cmd)
&& (ide_cmd_table[cmd].flags & (1u << s->drive_kind));
}
-void ide_exec_cmd(IDEBus *bus, uint32_t val)
+void ide_bus_exec_cmd(IDEBus *bus, uint32_t val)
{
IDEState *s;
bool complete;
s = idebus_active_if(bus);
- trace_ide_exec_cmd(bus, s, val);
+ trace_ide_bus_exec_cmd(bus, s, val);
/* ignore commands to non existent slave */
if (s != bus->ifs && !s->blk) {
diff --git a/hw/ide/trace-events b/hw/ide/trace-events
index 15d7921f15..a394c05710 100644
--- a/hw/ide/trace-events
+++ b/hw/ide/trace-events
@@ -12,7 +12,7 @@ ide_data_writew(uint32_t addr, uint32_t val, void *bus, void
*s)
ide_data_readl(uint32_t addr, uint32_t val, void *bus, void *s)
"IDE PIO rd @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState
%p"
ide_data_writel(uint32_t addr, uint32_t val, void *bus, void *s)
"IDE PIO wr @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState
%p"
# misc
-ide_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus %p;
state %p; cmd 0x%02x"
+ide_bus_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus %p;
state %p; cmd 0x%02x"
ide_cancel_dma_sync_buffered(void *fn, void *req) "invoking cb %p of buffered
request %p with -ECANCELED"
ide_cancel_dma_sync_remaining(void) "draining all remaining requests"
ide_sector_read(int64_t sector_num, int nsectors) "sector=%"PRId64"
nsectors=%d"
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index cc95cd47a0..11a4931ef9 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -622,7 +622,7 @@ int ide_init_ioport(IDEBus *bus, ISADevice *isa, int
iobase, int iobase2);
void ide_bus_set_irq(IDEBus *bus);
void ide_bus_register_restart_cb(IDEBus *bus);
-void ide_exec_cmd(IDEBus *bus, uint32_t val);
+void ide_bus_exec_cmd(IDEBus *bus, uint32_t val);
void ide_transfer_start(IDEState *s, uint8_t *buf, int size,
EndTransferFunc *end_transfer_func);
--
2.38.1
- [PATCH 08/20] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h', (continued)
- [PATCH 08/20] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h', Philippe Mathieu-Daudé, 2023/02/15
- [PATCH 09/20] hw/ide: Un-inline ide_set_irq(), Philippe Mathieu-Daudé, 2023/02/15
- [PATCH 10/20] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq(), Philippe Mathieu-Daudé, 2023/02/15
- [PATCH 11/20] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive(), Philippe Mathieu-Daudé, 2023/02/15
- [PATCH 12/20] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb, Philippe Mathieu-Daudé, 2023/02/15
- [PATCH 13/20] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd(),
Philippe Mathieu-Daudé <=
- [PATCH 14/20] hw/ide: Rename ide_init2() -> ide_bus_init_output_irq(), Philippe Mathieu-Daudé, 2023/02/15
- [PATCH 15/20] hw/ide: Rename idebus_active_if() -> ide_bus_active_if(), Philippe Mathieu-Daudé, 2023/02/15
- [PATCH 16/20] hw/ide/ioport: Remove unnecessary includes, Philippe Mathieu-Daudé, 2023/02/15
- [PATCH 17/20] hw/ide/pci: Unexport bmdma_active_if(), Philippe Mathieu-Daudé, 2023/02/15