pci_host: change the signature of pci_data_{read, write}.
change the first argument, void *opaque to PCIBus *s of the pci_data_{read, write}. They aren't used as direct callback so the argument type don't have to be void*. So change it to the right type. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
766347cc8c
commit
ce195fb532
4
hw/pci.h
4
hw/pci.h
@ -265,8 +265,8 @@ PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
|
||||
const char *default_devaddr);
|
||||
PCIDevice *pci_nic_init_nofail(NICInfo *nd, const char *default_model,
|
||||
const char *default_devaddr);
|
||||
void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len);
|
||||
uint32_t pci_data_read(void *opaque, uint32_t addr, int len);
|
||||
void pci_data_write(PCIBus *s, uint32_t addr, uint32_t val, int len);
|
||||
uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len);
|
||||
int pci_bus_num(PCIBus *s);
|
||||
void pci_for_each_device(PCIBus *bus, int bus_num, void (*fn)(PCIBus *bus, PCIDevice *d));
|
||||
PCIBus *pci_find_host_bus(int domain);
|
||||
|
@ -52,9 +52,8 @@ static inline uint32_t pci_addr_to_config(uint32_t addr)
|
||||
return addr & (PCI_CONFIG_SPACE_SIZE - 1);
|
||||
}
|
||||
|
||||
void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len)
|
||||
void pci_data_write(PCIBus *s, uint32_t addr, uint32_t val, int len)
|
||||
{
|
||||
PCIBus *s = opaque;
|
||||
PCIDevice *pci_dev = pci_addr_to_dev(s, addr);
|
||||
uint32_t config_addr = pci_addr_to_config(addr);
|
||||
|
||||
@ -66,9 +65,8 @@ void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len)
|
||||
pci_dev->config_write(pci_dev, config_addr, val, len);
|
||||
}
|
||||
|
||||
uint32_t pci_data_read(void *opaque, uint32_t addr, int len)
|
||||
uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len)
|
||||
{
|
||||
PCIBus *s = opaque;
|
||||
PCIDevice *pci_dev = pci_addr_to_dev(s, addr);
|
||||
uint32_t config_addr = pci_addr_to_config(addr);
|
||||
uint32_t val;
|
||||
|
Loading…
Reference in New Issue
Block a user