From: Ian Jackson Date: Mon, 23 Feb 2009 09:32:11 +0000 (+0000) Subject: [PATCH] ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlots X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4271a5aeef683c5b3d8c7967064e0ec90a5411dc;p=xenclient%2Fioemu.git [PATCH] ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlots 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 --- diff --git a/hw/piix4acpi.c b/hw/piix4acpi.c index 4e392078..91672ca8 100644 --- a/hw/piix4acpi.c +++ b/hw/piix4acpi.c @@ -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; }