]> xenbits.xensource.com Git - qemu-xen-3.4-testing.git/commitdiff
[PATCH] ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlots
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 23 Feb 2009 09:32:11 +0000 (09:32 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 23 Feb 2009 17:24:51 +0000 (17:24 +0000)
Some instances were cast and others were not.
This patch makes all instances not cast opaque into PHPSlots.

Also consistently use hotplug_slots as the variable to which
opaque is assigned.

Signed-off-by: Simon Horman <horms@verge.net.au>
hw/piix4acpi.c

index 4e392078d534c2ffaa543b21aaf62b4f2ab0ed8a..91672ca8ce624709a8af40a443a17af3d2cf8400 100644 (file)
@@ -279,24 +279,24 @@ static void acpi_php_writeb(void *opaque, uint32_t addr, uint32_t val)
 
 static void pcislots_save(QEMUFile* f, void* opaque)
 {
-    PHPSlots *s = (PHPSlots*)opaque;
+    PHPSlots *hotplug_slots = opaque;
     int i;
     for ( i = 0; i < ACPI_PHP_SLOT_NUM; i++ ) {
-        qemu_put_8s( f, &s->status[i]);
+        qemu_put_8s( f, &hotplug_slots->status[i]);
     }
-    qemu_put_8s(f, &s->plug_evt);
+    qemu_put_8s(f, &hotplug_slots->plug_evt);
 }
 
 static int pcislots_load(QEMUFile* f, void* opaque, int version_id)
 {
-    PHPSlots *s = (PHPSlots*)opaque;
+    PHPSlots *hotplug_slots = opaque;
     int i;
     if (version_id != 1)
         return -EINVAL;
     for ( i = 0; i < ACPI_PHP_SLOT_NUM; i++ ) {
-        qemu_get_8s( f, &s->status[i]);
+        qemu_get_8s( f, &hotplug_slots->status[i]);
     }
-    qemu_get_8s(f, &s->plug_evt);
+    qemu_get_8s(f, &hotplug_slots->plug_evt);
     return 0;
 }