From: Zihan Yang <tgnyang@gmail.com>
To: qemu-devel@nongnu.org
Cc: Zihan Yang <tgnyang@gmail.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Alexander Graf <agraf@suse.de>
Subject: [Qemu-devel] [PATCH 2/3] hw/s390x: make virtio_ccw_exit function in virtio-ccw return void
Date: Fri, 28 Apr 2017 20:55:09 +0800 [thread overview]
Message-ID: <1493384110-32060-3-git-send-email-tgnyang@gmail.com> (raw)
In-Reply-To: <1493384110-32060-1-git-send-email-tgnyang@gmail.com>
Only virtio_ccw_exit and the exit callback in VirtIOCCWDeviceClass are
converted to void in this patch. 'virtio_ccw_busdev_exit' belongs to
DeviceClass so it still returns int, DeviceClass::exit will return
void in future patches.
Signed-off-by: Zihan Yang <tgnyang@gmail.com>
---
hw/s390x/virtio-ccw.c | 6 +++---
hw/s390x/virtio-ccw.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index e7167e3..91b43ac 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -731,7 +731,7 @@ out_err:
g_free(sch);
}
-static int virtio_ccw_exit(VirtioCcwDevice *dev)
+static void virtio_ccw_exit(VirtioCcwDevice *dev)
{
CcwDevice *ccw_dev = CCW_DEVICE(dev);
SubchDev *sch = ccw_dev->sch;
@@ -744,7 +744,6 @@ static int virtio_ccw_exit(VirtioCcwDevice *dev)
release_indicator(&dev->routes.adapter, dev->indicators);
dev->indicators = NULL;
}
- return 0;
}
static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp)
@@ -1627,7 +1626,8 @@ static int virtio_ccw_busdev_exit(DeviceState *dev)
VirtioCcwDevice *_dev = (VirtioCcwDevice *)dev;
VirtIOCCWDeviceClass *_info = VIRTIO_CCW_DEVICE_GET_CLASS(dev);
- return _info->exit(_dev);
+ _info->exit(_dev);
+ return 0;
}
static void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev,
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index 41d4010..ce8baa3 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -74,7 +74,7 @@ typedef struct VirtioCcwDevice VirtioCcwDevice;
typedef struct VirtIOCCWDeviceClass {
CCWDeviceClass parent_class;
void (*realize)(VirtioCcwDevice *dev, Error **errp);
- int (*exit)(VirtioCcwDevice *dev);
+ void (*exit)(VirtioCcwDevice *dev);
} VirtIOCCWDeviceClass;
/* Performance improves when virtqueue kick processing is decoupled from the
--
2.7.4
next prev parent reply other threads:[~2017-04-28 13:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 12:55 [Qemu-devel] [PATCH 0/3] hw: make *_exit return void/convert to unrealize in sclp/virtio-ccw Zihan Yang
2017-04-28 12:55 ` [Qemu-devel] [PATCH 1/3] hw/char/sclp*: remove console_exit function in sclp Zihan Yang
2017-04-28 12:55 ` Zihan Yang [this message]
2017-04-28 12:55 ` [Qemu-devel] [PATCH 3/3] hw/s390: replace exit with unrealize during class init of virtio-ccw Zihan Yang
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=1493384110-32060-3-git-send-email-tgnyang@gmail.com \
--to=tgnyang@gmail.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).