From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvmIN-0005o1-B4 for qemu-devel@nongnu.org; Thu, 17 Jan 2013 05:02:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvmIL-0008Qw-MQ for qemu-devel@nongnu.org; Thu, 17 Jan 2013 05:02:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvmIL-0008Qo-D5 for qemu-devel@nongnu.org; Thu, 17 Jan 2013 05:02:01 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0HA20Bi004145 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 17 Jan 2013 05:02:00 -0500 From: Kevin Wolf Date: Thu, 17 Jan 2013 11:01:53 +0100 Message-Id: <1358416915-4103-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1358416915-4103-1-git-send-email-kwolf@redhat.com> References: <1358416915-4103-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH v4 1/3] ahci: Remove unused AHCIDevice fields List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com, quintela@redhat.com From: Jason Baron 'dma_status' and 'dma_cb' are written to, but never read. Remove these fields in preparation for AHCI migration bits. Signed-off-by: Jason Baron Reviewed-by: Juan Quintela Signed-off-by: Kevin Wolf --- hw/ide/ahci.c | 8 ++------ hw/ide/ahci.h | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 21f50ea..2d185cb 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1035,11 +1035,10 @@ out: static void ahci_start_dma(IDEDMA *dma, IDEState *s, BlockDriverCompletionFunc *dma_cb) { +#ifdef DEBUG_AHCI AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); - +#endif DPRINTF(ad->port_no, "\n"); - ad->dma_cb = dma_cb; - ad->dma_status |= BM_STATUS_DMAING; s->io_buffer_offset = 0; dma_cb(s, 0); } @@ -1095,7 +1094,6 @@ static int ahci_dma_set_unit(IDEDMA *dma, int unit) static int ahci_dma_add_status(IDEDMA *dma, int status) { AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); - ad->dma_status |= status; DPRINTF(ad->port_no, "set status: %x\n", status); if (status & BM_STATUS_INT) { @@ -1114,8 +1112,6 @@ static int ahci_dma_set_inactive(IDEDMA *dma) /* update d2h status */ ahci_write_fis_d2h(ad, NULL); - ad->dma_cb = NULL; - if (!ad->check_bh) { /* maybe we still have something to process, check later */ ad->check_bh = qemu_bh_new(ahci_check_cmd_bh, ad); diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h index 1200a56..735b379 100644 --- a/hw/ide/ahci.h +++ b/hw/ide/ahci.h @@ -281,11 +281,9 @@ struct AHCIDevice { QEMUBH *check_bh; uint8_t *lst; uint8_t *res_fis; - int dma_status; int done_atapi_packet; int busy_slot; int init_d2h_sent; - BlockDriverCompletionFunc *dma_cb; AHCICmdHdr *cur_cmd; NCQTransferState ncq_tfs[AHCI_MAX_CMDS]; }; -- 1.7.6.5