s390/sclp: replace sclp event types with proper defines
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 11 May 2015 13:31:47 +0000 (15:31 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 7 Sep 2015 14:10:43 +0000 (16:10 +0200)
Introduce TYPE_SCLP_QUIESCE and make use of it. Also use
TYPE_SCLP_CPU_HOTPLUG where applicable.

Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/event-facility.c
hw/s390x/sclpcpu.c
hw/s390x/sclpquiesce.c
include/hw/s390x/event-facility.h

index 7b64e782e909a79508b1fa03242e6d92f262fdc8..ef2a05160a9c772c9b9e481e73e33be77a43b05d 100644 (file)
@@ -353,7 +353,7 @@ static void init_event_facility(Object *obj)
                         TYPE_SCLP_EVENTS_BUS, sdev, NULL);
 
     object_initialize(&event_facility->quiesce_event, sizeof(SCLPEvent),
-                      "sclpquiesce");
+                      TYPE_SCLP_QUIESCE);
     qdev_set_parent_bus(DEVICE(&event_facility->quiesce_event),
                         &event_facility->sbus.qbus);
     object_initialize(&event_facility->cpu_hotplug_event, sizeof(SCLPEvent),
index 615ac06b18af99f1df5b29eff743df298f5d1e16..322eb31d958184a48048d021c040c8a5247e8b6e 100644 (file)
@@ -85,7 +85,7 @@ static void cpu_class_init(ObjectClass *oc, void *data)
 }
 
 static const TypeInfo sclp_cpu_info = {
-    .name          = "sclp-cpu-hotplug",
+    .name          = TYPE_SCLP_CPU_HOTPLUG,
     .parent        = TYPE_SCLP_EVENT,
     .instance_size = sizeof(SCLPEvent),
     .class_init    = cpu_class_init,
index ffa555313561f91a88b34175039619714e1fcb6a..15b06e108bf244ba1d1e712e4714f4b1b8a4caca 100644 (file)
@@ -66,7 +66,7 @@ static int read_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr,
 }
 
 static const VMStateDescription vmstate_sclpquiesce = {
-    .name = "sclpquiesce",
+    .name = TYPE_SCLP_QUIESCE,
     .version_id = 0,
     .minimum_version_id = 0,
     .fields = (VMStateField[]) {
@@ -127,7 +127,7 @@ static void quiesce_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo sclp_quiesce_info = {
-    .name          = "sclpquiesce",
+    .name          = TYPE_SCLP_QUIESCE,
     .parent        = TYPE_SCLP_EVENT,
     .instance_size = sizeof(SCLPEvent),
     .class_init    = quiesce_class_init,
index eae3b3bd631e018910d66769ccc389462a51377d..3c1ee350c85f3e09f106dcf9d4b5626812540277 100644 (file)
@@ -47,6 +47,7 @@
      OBJECT_GET_CLASS(SCLPEventClass, (obj), TYPE_SCLP_EVENT)
 
 #define TYPE_SCLP_CPU_HOTPLUG "sclp-cpu-hotplug"
+#define TYPE_SCLP_QUIESCE "sclpquiesce"
 
 typedef struct WriteEventMask {
     SCCBHeader h;