Patchwork [3/3] virtio-ccw, s390-virtio: Use generic virtio-blk macro.

login
register
mail settings
Submitter Cornelia Huck
Date March 20, 2013, 7:43 a.m.
Message ID <1363765425-5746-4-git-send-email-cornelia.huck@de.ibm.com>
Download mbox | patch
Permalink /patch/229259/
State New
Headers show

Comments

Cornelia Huck - March 20, 2013, 7:43 a.m.
Now that virtio-ccw and s390-virtio define all common properties
for virtio-blk, we can switch to using the generic
DEFINE_VIRTIO_BLK_PROPERTIES macro.

CC: Alexander Graf <agraf@suse.de>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 hw/s390x/s390-virtio-bus.c |    8 +-------
 hw/s390x/virtio-ccw.c      |    8 +-------
 2 files changed, 2 insertions(+), 14 deletions(-)

Patch

diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 5d55a9d..c5d5456 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -435,13 +435,7 @@  static const TypeInfo s390_virtio_net = {
 };
 
 static Property s390_virtio_blk_properties[] = {
-    DEFINE_BLOCK_PROPERTIES(VirtIOBlkS390, blk.conf),
-    DEFINE_BLOCK_CHS_PROPERTIES(VirtIOBlkS390, blk.conf),
-    DEFINE_PROP_STRING("serial", VirtIOBlkS390, blk.serial),
-#ifdef __linux__
-    DEFINE_PROP_BIT("scsi", VirtIOBlkS390, blk.scsi, 0, true),
-#endif
-    DEFINE_PROP_BIT("config-wce", VirtIOBlkS390, blk.config_wce, 0, true),
+    DEFINE_VIRTIO_BLK_PROPERTIES(VirtIOBlkS390, blk),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index afaf348..4c44b7e 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -756,14 +756,8 @@  static const TypeInfo virtio_ccw_net = {
 
 static Property virtio_ccw_blk_properties[] = {
     DEFINE_PROP_STRING("devno", VirtioCcwDevice, bus_id),
-    DEFINE_BLOCK_PROPERTIES(VirtIOBlkCcw, blk.conf),
-    DEFINE_BLOCK_CHS_PROPERTIES(VirtIOBlkCcw, blk.conf),
-    DEFINE_PROP_STRING("serial", VirtIOBlkCcw, blk.serial),
-#ifdef __linux__
-    DEFINE_PROP_BIT("scsi", VirtIOBlkCcw, blk.scsi, 0, true),
-#endif
-    DEFINE_PROP_BIT("config-wce", VirtIOBlkCcw, blk.config_wce, 0, true),
     DEFINE_VIRTIO_BLK_FEATURES(VirtioCcwDevice, host_features[0]),
+    DEFINE_VIRTIO_BLK_PROPERTIES(VirtIOBlkCcw, blk),
     DEFINE_PROP_END_OF_LIST(),
 };