[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 27/30] ide: call ide_cmd_done from ide_transfer_stop
From: |
John Snow |
Subject: |
[Qemu-devel] [PULL 27/30] ide: call ide_cmd_done from ide_transfer_stop |
Date: |
Fri, 8 Jun 2018 13:47:30 -0400 |
From: Paolo Bonzini <address@hidden>
The code can simply be moved to the sole caller that has notify == true.
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>
---
hw/ide/core.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 1a6cb337bf..54799ea6fb 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -548,26 +548,23 @@ static void ide_cmd_done(IDEState *s)
}
static void ide_transfer_halt(IDEState *s,
- void(*end_transfer_func)(IDEState *),
- bool notify)
+ void(*end_transfer_func)(IDEState *))
{
s->end_transfer_func = end_transfer_func;
s->data_ptr = s->io_buffer;
s->data_end = s->io_buffer;
s->status &= ~DRQ_STAT;
- if (notify) {
- ide_cmd_done(s);
- }
}
void ide_transfer_stop(IDEState *s)
{
- ide_transfer_halt(s, ide_transfer_stop, true);
+ ide_transfer_halt(s, ide_transfer_stop);
+ ide_cmd_done(s);
}
static void ide_transfer_cancel(IDEState *s)
{
- ide_transfer_halt(s, ide_transfer_cancel, false);
+ ide_transfer_halt(s, ide_transfer_cancel);
}
int64_t ide_get_sector(IDEState *s)
--
2.14.3
- [Qemu-devel] [PULL 08/30] ahci: combine identical clauses in port write, (continued)
- [Qemu-devel] [PULL 08/30] ahci: combine identical clauses in port write, John Snow, 2018/06/08
- [Qemu-devel] [PULL 14/30] ahci: modify ahci_mem_read_32 to work on register numbers, John Snow, 2018/06/08
- [Qemu-devel] [PULL 13/30] ahci: fix host register max address, John Snow, 2018/06/08
- [Qemu-devel] [PULL 11/30] ahci: delete old port register address definitions, John Snow, 2018/06/08
- [Qemu-devel] [PULL 12/30] ahci: add host register enumeration, John Snow, 2018/06/08
- [Qemu-devel] [PULL 06/30] ahci: make port read traces more descriptive, John Snow, 2018/06/08
- [Qemu-devel] [PULL 09/30] ahci: modify ahci_port_write to use register numbers, John Snow, 2018/06/08
- [Qemu-devel] [PULL 17/30] ahci: adjust ahci_mem_write to work on registers, John Snow, 2018/06/08
- [Qemu-devel] [PULL 16/30] ahci: fix spacing damage on ahci_mem_write, John Snow, 2018/06/08
- [Qemu-devel] [PULL 26/30] ide: push end_transfer_func out of start_transfer callback, rename callback, John Snow, 2018/06/08
- [Qemu-devel] [PULL 27/30] ide: call ide_cmd_done from ide_transfer_stop,
John Snow <=
- [Qemu-devel] [PULL 04/30] ahci: add port register enumeration, John Snow, 2018/06/08
- [Qemu-devel] [PULL 10/30] ahci: make port write traces more descriptive, John Snow, 2018/06/08
- [Qemu-devel] [PULL 07/30] ahci: fix spacing damage on ahci_port_write, John Snow, 2018/06/08
- [Qemu-devel] [PULL 20/30] tests/boot-sector: Add magic bytes to s390x boot code header, John Snow, 2018/06/08
- [Qemu-devel] [PULL 23/30] MAINTAINERS: Add the cdrom-test to John's section, John Snow, 2018/06/08
- [Qemu-devel] [PULL 19/30] ahci: make ahci_mem_write traces more descriptive, John Snow, 2018/06/08
- [Qemu-devel] [PULL 28/30] ide: make ide_transfer_stop idempotent, John Snow, 2018/06/08
- [Qemu-devel] [PULL 22/30] tests/cdrom-test: Test that -cdrom parameter is working, John Snow, 2018/06/08
- [Qemu-devel] [PULL 21/30] tests/cdrom-test: Test booting from CD-ROM ISO image file, John Snow, 2018/06/08
- [Qemu-devel] [PULL 25/30] ahci: move PIO Setup FIS before transfer, fix it for ATAPI commands, John Snow, 2018/06/08