[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/14] block: dma_bdrv_* does not return NULL
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 05/14] block: dma_bdrv_* does not return NULL |
Date: |
Thu, 15 Dec 2011 15:09:20 +0100 |
From: Paolo Bonzini <address@hidden>
Initially attempted with the following semantic patch:
@ rule1 @
expression E;
statement S;
@@
E =
(
dma_bdrv_io
| dma_bdrv_read
| dma_bdrv_write
)
(...);
(
- if (E == NULL) { ... }
|
- if (E)
{ <... S ...> }
)
which however did not match anything.
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/ide/core.c | 6 ------
hw/ide/macio.c | 4 +---
2 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 7071326..de9ed41 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -549,7 +549,6 @@ void ide_dma_cb(void *opaque, int ret)
int n;
int64_t sector_num;
-handle_rw_error:
if (ret < 0) {
int op = BM_STATUS_DMA_RETRY;
@@ -608,11 +607,6 @@ handle_rw_error:
ide_issue_trim, ide_dma_cb, s, true);
break;
}
-
- if (!s->bus->dma->aiocb) {
- ret = -1;
- goto handle_rw_error;
- }
return;
eot:
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 40f60f0..abbc41b 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -152,10 +152,8 @@ static void pmac_ide_transfer_cb(void *opaque, int ret)
ide_issue_trim, pmac_ide_transfer_cb, s, true);
break;
}
-
- if (!m->aiocb)
- pmac_ide_transfer_cb(io, -1);
return;
+
done:
if (s->dma_cmd == IDE_DMA_READ || s->dma_cmd == IDE_DMA_WRITE) {
bdrv_acct_done(s->bs, &s->acct);
--
1.7.6.4
- [Qemu-devel] [PULL 00/14] Block patches, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 01/14] block: bdrv_aio_* do not return NULL, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 02/14] block: simplify failure handling for bdrv_aio_multiwrite, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 06/14] block: avoid useless checks on acb->bh, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 03/14] block: qemu_aio_get does not return NULL, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 07/14] block/qcow2.c: call qcow2_free_snapshots in the function of qcow2_close, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 04/14] dma: the passed io_func does not return NULL, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 08/14] rbd: always set out parameter in qemu_rbd_snap_list, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 05/14] block: dma_bdrv_* does not return NULL,
Kevin Wolf <=
- [Qemu-devel] [PATCH 11/14] qcow2: Allow >4 GB VM state, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 09/14] qemu-img rebase: Fix for undersized backing files, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 13/14] block/cow: Return real error code, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 14/14] qiov: prevent double free or use-after-free, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 10/14] Documentation: Add qemu-img -t parameter in man page, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 12/14] coroutine: switch per-thread free pool to a global pool, Kevin Wolf, 2011/12/15
- Re: [Qemu-devel] [PULL 00/14] Block patches, Anthony Liguori, 2011/12/19