qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@redhat.com>
To: kwolf@redhat.com, afaerber@suse.de, agraf@suse.de
Cc: i.mitsyanko@samsung.com, quintela@redhat.com,
	jan.kiszka@siemens.com, qemu-devel@nongnu.org,
	aderumier@odiso.com, yamahata@valinux.co.jp
Subject: [Qemu-devel] [PATCH v3 1/2] ahci: remove unused AHCIDevice fields
Date: Fri, 4 Jan 2013 14:44:41 -0500	[thread overview]
Message-ID: <059dba42dd5bac13a2e03b634d13f27c57ba2e1e.1357327435.git.jbaron@redhat.com> (raw)
In-Reply-To: <cover.1357327435.git.jbaron@redhat.com>

From: Jason Baron <jbaron@redhat.com>

'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 <jbaron@redhat.com>
---
 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 d072449..72cd1c8 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.1

  reply	other threads:[~2013-01-04 19:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 19:44 [Qemu-devel] [PATCH v3 0/2] add ahci migration Jason Baron
2013-01-04 19:44 ` Jason Baron [this message]
2013-01-15 14:51   ` [Qemu-devel] [PATCH v3 1/2] ahci: remove unused AHCIDevice fields Juan Quintela
2013-01-04 19:44 ` [Qemu-devel] [PATCH v3 2/2] ahci: add migration support Jason Baron
2013-01-10 11:52   ` Kevin Wolf
2013-01-15 14:54   ` Juan Quintela
2013-01-15 15:02     ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=059dba42dd5bac13a2e03b634d13f27c57ba2e1e.1357327435.git.jbaron@redhat.com \
    --to=jbaron@redhat.com \
    --cc=aderumier@odiso.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=i.mitsyanko@samsung.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=yamahata@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).