qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/3] scsi-bus: use DO_UPCAST
Date: Fri, 12 Aug 2011 13:12:19 +0100	[thread overview]
Message-ID: <1313151141-8541-2-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1313151141-8541-1-git-send-email-stefanha@linux.vnet.ibm.com>

From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/scsi-bus.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index 0b0344c..d1ef559 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -725,7 +725,7 @@ void scsi_device_purge_requests(SCSIDevice *sdev)
 
 static char *scsibus_get_fw_dev_path(DeviceState *dev)
 {
-    SCSIDevice *d = (SCSIDevice*)dev;
+    SCSIDevice *d = DO_UPCAST(SCSIDevice, qdev, dev);
     SCSIBus *bus = scsi_bus_from_device(d);
     char path[100];
     int i;
-- 
1.7.5.4

  reply	other threads:[~2011-08-12 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 12:12 [Qemu-devel] [PULL 0/3] Trivial patches for August 4 to 12 2011 Stefan Hajnoczi
2011-08-12 12:12 ` Stefan Hajnoczi [this message]
2011-08-12 12:12 ` [Qemu-devel] [PATCH 2/3] hw/qdev: Don't crash if qdev_create(NULL, ...) fails Stefan Hajnoczi
2011-08-12 12:12 ` [Qemu-devel] [PATCH 3/3] fix QLIST usage for RAM list Stefan Hajnoczi

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=1313151141-8541-2-git-send-email-stefanha@linux.vnet.ibm.com \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wuzhy@linux.vnet.ibm.com \
    /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).