qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-scsi: fix object check failure
@ 2014-06-18 12:13 Ming Lei
  2014-06-18 12:29 ` Paolo Bonzini
  2014-06-18 14:23 ` Andreas Färber
  0 siblings, 2 replies; 10+ messages in thread
From: Ming Lei @ 2014-06-18 12:13 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel, Paolo Bonzini
  Cc: Ming Lei, qemu-stable, Anthony Liguori, Michael S. Tsirkin

In case of vhost-scsi, the object type of VirtIODevice isn't
VirtIOSCSI, so use the cast trick to fix the problem like
in virtio_scsi_handle_cmd()

Cc: qemu-stable@nongnu.org
Cc: Anthony Liguori <aliguori@amazon.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 hw/scsi/virtio-scsi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index b0d7517..13700f5 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -538,7 +538,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,
 
 static void virtio_scsi_handle_event(VirtIODevice *vdev, VirtQueue *vq)
 {
-    VirtIOSCSI *s = VIRTIO_SCSI(vdev);
+    VirtIOSCSI *s = (VirtIOSCSI *)vdev;
 
     if (s->events_dropped) {
         virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-07-26  3:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 12:13 [Qemu-devel] [PATCH] virtio-scsi: fix object check failure Ming Lei
2014-06-18 12:29 ` Paolo Bonzini
2014-06-18 14:18   ` Ming Lei
2014-06-18 15:02     ` Paolo Bonzini
2014-06-18 15:06       ` Paolo Bonzini
2014-06-18 15:11         ` Ming Lei
2014-07-25 23:10           ` Nicholas A. Bellinger
2014-07-26  3:52             ` Ming Lei
2014-06-18 14:23 ` Andreas Färber
2014-06-18 14:43   ` Ming Lei

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).