Patchwork [01/17] ide: drop argument to dma_buf_commit

login
register
mail settings
Submitter Stefan Hajnoczi
Date Dec. 19, 2011, 11:12 a.m.
Message ID <1324293158-25433-2-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/132193/
State New
Headers show

Comments

Stefan Hajnoczi - Dec. 19, 2011, 11:12 a.m.
From: Paolo Bonzini <pbonzini@redhat.com>

The argument is unused and even wrong when the function is called
by ide_handle_rw_error.  Drop it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/ide/core.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 49847bd..753c442 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -493,7 +493,7 @@  void ide_sector_read(IDEState *s)
     }
 }
 
-static void dma_buf_commit(IDEState *s, int is_write)
+static void dma_buf_commit(IDEState *s)
 {
     qemu_sglist_destroy(&s->sg);
 }
@@ -532,7 +532,7 @@  static int ide_handle_rw_error(IDEState *s, int error, int op)
         bdrv_iostatus_set_err(s->bs, error);
     } else {
         if (op & BM_STATUS_DMA_RETRY) {
-            dma_buf_commit(s, 0);
+            dma_buf_commit(s);
             ide_dma_error(s);
         } else {
             ide_rw_error(s);
@@ -566,7 +566,7 @@  handle_rw_error:
     n = s->io_buffer_size >> 9;
     sector_num = ide_get_sector(s);
     if (n > 0) {
-        dma_buf_commit(s, ide_cmd_is_read(s));
+        dma_buf_commit(s);
         sector_num += n;
         ide_set_sector(s, sector_num);
         s->nsector -= n;