]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
vmstate: remove const from pre_save() functions
authorJuan Quintela <quintela@redhat.com>
Tue, 29 Sep 2009 20:48:22 +0000 (22:48 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:37 +0000 (09:32 -0500)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
exec.c
hw/fdc.c
hw/hpet.c
hw/hw.h
hw/serial.c

diff --git a/exec.c b/exec.c
index 85076e60904d9a006ec6d80f8bff9bab1488daf9..aafd8147db68b4551d992b99ad3904a42580d243 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -513,9 +513,9 @@ void cpu_exec_init_all(unsigned long tb_size)
 
 #if defined(CPU_SAVE_VERSION) && !defined(CONFIG_USER_ONLY)
 
-static void cpu_common_pre_save(const void *opaque)
+static void cpu_common_pre_save(void *opaque)
 {
-    CPUState *env = (void *)opaque;
+    CPUState *env = opaque;
 
     cpu_synchronize_state(env);
 }
index c03ab476c3ec5914326dc47bfb8e20f76c11d6f9..a7c65c70ffb344566d8d4802275e82ffbae1ee9d 100644 (file)
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -643,9 +643,9 @@ static const VMStateDescription vmstate_fdrive = {
     }
 };
 
-static void fdc_pre_save(const void *opaque)
+static void fdc_pre_save(void *opaque)
 {
-    fdctrl_t *s = (void *)opaque;
+    fdctrl_t *s = opaque;
 
     s->dor_vmstate = s->dor | GET_CUR_DRV(s);
 }
index 6535b8ebf20766aa4224e897d15b64bd409dd73c..64163bd52437f9b826994ba645e3d76ff13d4e59 100644 (file)
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -157,9 +157,9 @@ static void update_irq(struct HPETTimer *timer)
     }
 }
 
-static void hpet_pre_save(const void *opaque)
+static void hpet_pre_save(void *opaque)
 {
-    HPETState *s = (void *)opaque;
+    HPETState *s = opaque;
     /* save current counter value */
     s->hpet_counter = hpet_get_ticks();
 }
diff --git a/hw/hw.h b/hw/hw.h
index 6f60493ce7bf3d6a11a020c1ff791adeafa2f1cd..b9ae33a127cb8a156d1ca3d965d83c80769c0a11 100644 (file)
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -308,8 +308,8 @@ struct VMStateDescription {
     LoadStateHandler *load_state_old;
     int (*pre_load)(void *opaque);
     int (*post_load)(void *opaque, int version_id);
-    void (*pre_save)(const void *opaque);
-    void (*post_save)(const void *opaque);
+    void (*pre_save)(void *opaque);
+    void (*post_save)(void *opaque);
     VMStateField *fields;
 };
 
index 6e37ead06e2e67c0087ad832c017e9b5a74c04c0..4cdf2303a0206553c8959c7b5bbc43711272db88 100644 (file)
@@ -635,9 +635,9 @@ static void serial_event(void *opaque, int event)
         serial_receive_break(s);
 }
 
-static void serial_pre_save(const void *opaque)
+static void serial_pre_save(void *opaque)
 {
-    SerialState *s = (void *)opaque;
+    SerialState *s = opaque;
     s->fcr_vmstate = s->fcr;
 }