aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/ide/microdrive.c18
-rw-r--r--hw/ide/mmio.c8
2 files changed, 13 insertions, 13 deletions
diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
index 887cde3c30..aeb77a030f 100644
--- a/hw/ide/microdrive.c
+++ b/hw/ide/microdrive.c
@@ -94,7 +94,7 @@ static inline void md_interrupt_update(MicroDriveState *s)
static void md_set_irq(void *opaque, int irq, int level)
{
- MicroDriveState *s = (MicroDriveState *) opaque;
+ MicroDriveState *s = opaque;
if (level)
s->stat |= STAT_INT;
else
@@ -115,7 +115,7 @@ static void md_reset(MicroDriveState *s)
static uint8_t md_attr_read(void *opaque, uint32_t at)
{
- MicroDriveState *s = (MicroDriveState *) opaque;
+ MicroDriveState *s = opaque;
if (at < s->attr_base) {
if (at < s->card.cis_len)
return s->card.cis[at];
@@ -148,7 +148,7 @@ static uint8_t md_attr_read(void *opaque, uint32_t at)
static void md_attr_write(void *opaque, uint32_t at, uint8_t value)
{
- MicroDriveState *s = (MicroDriveState *) opaque;
+ MicroDriveState *s = opaque;
at -= s->attr_base;
switch (at) {
@@ -179,7 +179,7 @@ static void md_attr_write(void *opaque, uint32_t at, uint8_t value)
static uint16_t md_common_read(void *opaque, uint32_t at)
{
- MicroDriveState *s = (MicroDriveState *) opaque;
+ MicroDriveState *s = opaque;
IDEState *ifs;
uint16_t ret;
at -= s->io_base;
@@ -241,7 +241,7 @@ static uint16_t md_common_read(void *opaque, uint32_t at)
static void md_common_write(void *opaque, uint32_t at, uint16_t value)
{
- MicroDriveState *s = (MicroDriveState *) opaque;
+ MicroDriveState *s = opaque;
at -= s->io_base;
switch (s->opt & OPT_MODE) {
@@ -302,7 +302,7 @@ static void md_common_write(void *opaque, uint32_t at, uint16_t value)
static void md_save(QEMUFile *f, void *opaque)
{
- MicroDriveState *s = (MicroDriveState *) opaque;
+ MicroDriveState *s = opaque;
int i;
qemu_put_8s(f, &s->opt);
@@ -321,7 +321,7 @@ static void md_save(QEMUFile *f, void *opaque)
static int md_load(QEMUFile *f, void *opaque, int version_id)
{
- MicroDriveState *s = (MicroDriveState *) opaque;
+ MicroDriveState *s = opaque;
int i;
if (version_id != 0 && version_id != 3)
@@ -530,7 +530,7 @@ static const uint8_t dscm1xxxx_cis[0x14a] = {
static int dscm1xxxx_attach(void *opaque)
{
- MicroDriveState *md = (MicroDriveState *) opaque;
+ MicroDriveState *md = opaque;
md->card.attr_read = md_attr_read;
md->card.attr_write = md_attr_write;
md->card.common_read = md_common_read;
@@ -550,7 +550,7 @@ static int dscm1xxxx_attach(void *opaque)
static int dscm1xxxx_detach(void *opaque)
{
- MicroDriveState *md = (MicroDriveState *) opaque;
+ MicroDriveState *md = opaque;
md_reset(md);
return 0;
}
diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
index acaa900c89..7a6bf3249d 100644
--- a/hw/ide/mmio.c
+++ b/hw/ide/mmio.c
@@ -43,7 +43,7 @@ typedef struct {
static uint32_t mmio_ide_read (void *opaque, target_phys_addr_t addr)
{
- MMIOState *s = (MMIOState*)opaque;
+ MMIOState *s = opaque;
IDEBus *bus = s->bus;
addr >>= s->shift;
if (addr & 7)
@@ -55,7 +55,7 @@ static uint32_t mmio_ide_read (void *opaque, target_phys_addr_t addr)
static void mmio_ide_write (void *opaque, target_phys_addr_t addr,
uint32_t val)
{
- MMIOState *s = (MMIOState*)opaque;
+ MMIOState *s = opaque;
IDEBus *bus = s->bus;
addr >>= s->shift;
if (addr & 7)
@@ -78,7 +78,7 @@ static CPUWriteMemoryFunc * const mmio_ide_writes[] = {
static uint32_t mmio_ide_status_read (void *opaque, target_phys_addr_t addr)
{
- MMIOState *s= (MMIOState*)opaque;
+ MMIOState *s= opaque;
IDEBus *bus = s->bus;
return ide_status_read(bus, 0);
}
@@ -86,7 +86,7 @@ static uint32_t mmio_ide_status_read (void *opaque, target_phys_addr_t addr)
static void mmio_ide_cmd_write (void *opaque, target_phys_addr_t addr,
uint32_t val)
{
- MMIOState *s = (MMIOState*)opaque;
+ MMIOState *s = opaque;
IDEBus *bus = s->bus;
ide_cmd_write(bus, 0, val);
}