diff mbox series

[01/29] vmsvga: Stop using redundant fifo pointer variable

Message ID 1533815202-11967-2-git-send-email-liran.alon@oracle.com (mailing list archive)
State New, archived
Headers show
Series : vmsvga: Various fixes and enhancements | expand

Commit Message

Liran Alon Aug. 9, 2018, 11:46 a.m. UTC
From: Leonid Shatz <leonid.shatz@oracle.com>

Signed-off-by: Leonid Shatz <leonid.shatz@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
---
 hw/display/vmware_vga.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index 0bbb78b9a6fd..60a672530840 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -63,7 +63,6 @@  struct vmsvga_state_s {
     int syncing;
 
     MemoryRegion fifo_ram;
-    uint8_t *fifo_ptr;
     unsigned int fifo_size;
 
     uint32_t *fifo;
@@ -1022,7 +1021,6 @@  static void vmsvga_value_write(void *opaque, uint32_t address, uint32_t value)
 
     case SVGA_REG_CONFIG_DONE:
         if (value) {
-            s->fifo = (uint32_t *) s->fifo_ptr;
             vga_dirty_log_stop(&s->vga);
         }
         s->config = !!value;
@@ -1179,9 +1177,6 @@  static int vmsvga_post_load(void *opaque, int version_id)
     struct vmsvga_state_s *s = opaque;
 
     s->invalidated = 1;
-    if (s->config) {
-        s->fifo = (uint32_t *) s->fifo_ptr;
-    }
     return 0;
 }
 
@@ -1240,7 +1235,7 @@  static void vmsvga_init(DeviceState *dev, struct vmsvga_state_s *s,
     s->fifo_size = SVGA_FIFO_SIZE;
     memory_region_init_ram(&s->fifo_ram, NULL, "vmsvga.fifo", s->fifo_size,
                            &error_fatal);
-    s->fifo_ptr = memory_region_get_ram_ptr(&s->fifo_ram);
+    s->fifo = (uint32_t *)memory_region_get_ram_ptr(&s->fifo_ram);
 
     vga_common_init(&s->vga, OBJECT(dev));
     vga_init(&s->vga, OBJECT(dev), address_space, io, true);