From patchwork Mon Dec 19 11:12:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 132193 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E887FB6FF6 for ; Mon, 19 Dec 2011 22:14:48 +1100 (EST) Received: from localhost ([::1]:52561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcbB6-00025Z-Aj for incoming@patchwork.ozlabs.org; Mon, 19 Dec 2011 06:14:44 -0500 Received: from eggs.gnu.org ([140.186.70.92]:42696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcbAm-0001w3-LJ for qemu-devel@nongnu.org; Mon, 19 Dec 2011 06:14:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcbAg-0002Rr-Uj for qemu-devel@nongnu.org; Mon, 19 Dec 2011 06:14:24 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:47106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcbAg-0002Rc-Lw for qemu-devel@nongnu.org; Mon, 19 Dec 2011 06:14:18 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Dec 2011 11:14:16 -0000 Received: from d06nrmr1407.portsmouth.uk.ibm.com ([9.149.38.185]) by e06smtp15.uk.ibm.com ([192.168.101.145]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 19 Dec 2011 11:13:51 -0000 Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBJBDoBi1786104 for ; Mon, 19 Dec 2011 11:13:50 GMT Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBJBDoYg011001 for ; Mon, 19 Dec 2011 04:13:50 -0700 Received: from localhost (stefanha-thinkpad.manchester-maybrook.uk.ibm.com [9.174.219.31]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pBJBDorD010991; Mon, 19 Dec 2011 04:13:50 -0700 From: Stefan Hajnoczi To: Date: Mon, 19 Dec 2011 11:12:22 +0000 Message-Id: <1324293158-25433-2-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1324293158-25433-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1324293158-25433-1-git-send-email-stefanha@linux.vnet.ibm.com> x-cbid: 11121911-0342-0000-0000-000000632FB8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.75.94.111 Cc: Paolo Bonzini , Anthony Liguori , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 01/17] ide: drop argument to dma_buf_commit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Paolo Bonzini The argument is unused and even wrong when the function is called by ide_handle_rw_error. Drop it. Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- hw/ide/core.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) 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;