[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/12] ide: change cast to DO_UPCAST
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 01/12] ide: change cast to DO_UPCAST |
Date: |
Wed, 7 Oct 2009 16:56:18 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
---
hw/ide/pci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 6d090bc..0e2c7d7 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -62,7 +62,7 @@ static void cmd646_update_irq(PCIIDEState *d);
static void ide_map(PCIDevice *pci_dev, int region_num,
uint32_t addr, uint32_t size, int type)
{
- PCIIDEState *d = (PCIIDEState *)pci_dev;
+ PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev);
IDEBus *bus;
if (region_num <= 3) {
@@ -247,7 +247,7 @@ static void bmdma_addr_writel(void *opaque, uint32_t addr,
uint32_t val)
static void bmdma_map(PCIDevice *pci_dev, int region_num,
uint32_t addr, uint32_t size, int type)
{
- PCIIDEState *d = (PCIIDEState *)pci_dev;
+ PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev);
int i;
for(i = 0;i < 2; i++) {
--
1.6.2.5
- [Qemu-devel] [PATCH 00/12] PCI IDE cleanup, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 01/12] ide: change cast to DO_UPCAST,
Juan Quintela <=
- [Qemu-devel] [PATCH 02/12] ide: Remove cast in pci_register_bar, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 03/12] ide: Remove duplicated definitions, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 04/12] ide: remove uselsess casts from void *, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 06/12] ide: export needed ide-pci functions for split, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 05/12] ide: create ide/pci.h for common ide pci definitions, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 07/12] ide: split cmd646 and piix from pci.c, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 08/12] ide: PCIIDEState type field is not needed anymore, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 09/12] ide: 'secondary' field is only used by cmd646, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 10/12] ide: cmd646 we can get the pci device with container_of, Juan Quintela, 2009/10/07
- [Qemu-devel] [PATCH 12/12] ide: BMDMAState don't need a pci_dev field anymore, Juan Quintela, 2009/10/07