Patchwork [07/26] lsi53c895a: remove pointless cast from void *

login
register
mail settings
Submitter Juan Quintela
Date Aug. 24, 2009, 4:42 p.m.
Message ID <185b1c092f90e02f9816599c3ab77899804a73eb.1251131364.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/31967/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 24, 2009, 4:42 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/lsi53c895a.c |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

Patch

diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index f749a45..f8501d4 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -635,7 +635,7 @@  static int lsi_queue_tag(LSIState *s, uint32_t tag, uint32_t arg)
 static void lsi_command_complete(void *opaque, int reason, uint32_t tag,
                                  uint32_t arg)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     int out;

     out = (s->sstat1 & PHASE_MASK) == PHASE_DO;
@@ -1724,14 +1724,14 @@  static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)

 static void lsi_mmio_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;

     lsi_reg_writeb(s, addr & 0xff, val);
 }

 static void lsi_mmio_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;

     addr &= 0xff;
     lsi_reg_writeb(s, addr, val & 0xff);
@@ -1740,7 +1740,7 @@  static void lsi_mmio_writew(void *opaque, target_phys_addr_t addr, uint32_t val)

 static void lsi_mmio_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;

     addr &= 0xff;
     lsi_reg_writeb(s, addr, val & 0xff);
@@ -1751,14 +1751,14 @@  static void lsi_mmio_writel(void *opaque, target_phys_addr_t addr, uint32_t val)

 static uint32_t lsi_mmio_readb(void *opaque, target_phys_addr_t addr)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;

     return lsi_reg_readb(s, addr & 0xff);
 }

 static uint32_t lsi_mmio_readw(void *opaque, target_phys_addr_t addr)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     uint32_t val;

     addr &= 0xff;
@@ -1769,7 +1769,7 @@  static uint32_t lsi_mmio_readw(void *opaque, target_phys_addr_t addr)

 static uint32_t lsi_mmio_readl(void *opaque, target_phys_addr_t addr)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     uint32_t val;
     addr &= 0xff;
     val = lsi_reg_readb(s, addr);
@@ -1793,7 +1793,7 @@  static CPUWriteMemoryFunc *lsi_mmio_writefn[3] = {

 static void lsi_ram_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     uint32_t newval;
     int shift;

@@ -1807,7 +1807,7 @@  static void lsi_ram_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)

 static void lsi_ram_writew(void *opaque, target_phys_addr_t addr, uint32_t val)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     uint32_t newval;

     addr &= 0x1fff;
@@ -1823,7 +1823,7 @@  static void lsi_ram_writew(void *opaque, target_phys_addr_t addr, uint32_t val)

 static void lsi_ram_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;

     addr &= 0x1fff;
     s->script_ram[addr >> 2] = val;
@@ -1831,7 +1831,7 @@  static void lsi_ram_writel(void *opaque, target_phys_addr_t addr, uint32_t val)

 static uint32_t lsi_ram_readb(void *opaque, target_phys_addr_t addr)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     uint32_t val;

     addr &= 0x1fff;
@@ -1842,7 +1842,7 @@  static uint32_t lsi_ram_readb(void *opaque, target_phys_addr_t addr)

 static uint32_t lsi_ram_readw(void *opaque, target_phys_addr_t addr)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     uint32_t val;

     addr &= 0x1fff;
@@ -1854,7 +1854,7 @@  static uint32_t lsi_ram_readw(void *opaque, target_phys_addr_t addr)

 static uint32_t lsi_ram_readl(void *opaque, target_phys_addr_t addr)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;

     addr &= 0x1fff;
     return le32_to_cpu(s->script_ram[addr >> 2]);
@@ -1874,13 +1874,13 @@  static CPUWriteMemoryFunc *lsi_ram_writefn[3] = {

 static uint32_t lsi_io_readb(void *opaque, uint32_t addr)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     return lsi_reg_readb(s, addr & 0xff);
 }

 static uint32_t lsi_io_readw(void *opaque, uint32_t addr)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     uint32_t val;
     addr &= 0xff;
     val = lsi_reg_readb(s, addr);
@@ -1890,7 +1890,7 @@  static uint32_t lsi_io_readw(void *opaque, uint32_t addr)

 static uint32_t lsi_io_readl(void *opaque, uint32_t addr)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     uint32_t val;
     addr &= 0xff;
     val = lsi_reg_readb(s, addr);
@@ -1902,13 +1902,13 @@  static uint32_t lsi_io_readl(void *opaque, uint32_t addr)

 static void lsi_io_writeb(void *opaque, uint32_t addr, uint32_t val)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     lsi_reg_writeb(s, addr & 0xff, val);
 }

 static void lsi_io_writew(void *opaque, uint32_t addr, uint32_t val)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     addr &= 0xff;
     lsi_reg_writeb(s, addr, val & 0xff);
     lsi_reg_writeb(s, addr + 1, (val >> 8) & 0xff);
@@ -1916,7 +1916,7 @@  static void lsi_io_writew(void *opaque, uint32_t addr, uint32_t val)

 static void lsi_io_writel(void *opaque, uint32_t addr, uint32_t val)
 {
-    LSIState *s = (LSIState *)opaque;
+    LSIState *s = opaque;
     addr &= 0xff;
     lsi_reg_writeb(s, addr, val & 0xff);
     lsi_reg_writeb(s, addr + 1, (val >> 8) & 0xff);