[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH V5 21/29] pci_host: change the signature of pci_
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH V5 21/29] pci_host: change the signature of pci_data_{read, write}. |
Date: |
Fri, 9 Oct 2009 14:02:39 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Fri, Oct 09, 2009 at 03:28:54PM +0900, Isaku Yamahata wrote:
> 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 <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
> ---
> hw/pci.h | 4 ++--
> hw/pci_host.c | 6 ++----
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/hw/pci.h b/hw/pci.h
> index 7711ed4..5b8f5cf 100644
> --- a/hw/pci.h
> +++ b/hw/pci.h
> @@ -272,8 +272,8 @@ void pci_dev_write_config(PCIDevice *pci_dev,
> uint32_t config_addr, uint32_t val, int len);
> uint32_t pci_dev_read_config(PCIDevice *pci_dev,
> uint32_t config_addr, int len);
> -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);
> diff --git a/hw/pci_host.c b/hw/pci_host.c
> index d827b06..87933d9 100644
> --- a/hw/pci_host.c
> +++ b/hw/pci_host.c
> @@ -52,16 +52,14 @@ static inline uint32_t pci_addr_to_config(uint32_t addr)
> return addr & 0xff;
> }
>
> -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;
> pci_dev_write_config(pci_addr_to_dev(s, addr), pci_addr_to_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;
> return pci_dev_read_config(pci_addr_to_dev(s, addr),
> pci_addr_to_config(addr), len);
> }
> --
> 1.6.0.2
- [Qemu-devel] [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), (continued)
- [Qemu-devel] [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Isaku Yamahata, 2009/10/09
- [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Michael S. Tsirkin, 2009/10/09
- [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Isaku Yamahata, 2009/10/13
- [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Michael S. Tsirkin, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Blue Swirl, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Michael S. Tsirkin, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Blue Swirl, 2009/10/13
[Qemu-devel] Re: [PATCH V5 07/29] pci/bridge: clean up of pci_bridge_initfn(), Michael S. Tsirkin, 2009/10/09
[Qemu-devel] [PATCH V5 12/29] pci_host: consolidate pci config address access., Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 21/29] pci_host: change the signature of pci_data_{read, write}., Isaku Yamahata, 2009/10/09
- [Qemu-devel] Re: [PATCH V5 21/29] pci_host: change the signature of pci_data_{read, write}.,
Michael S. Tsirkin <=
[Qemu-devel] [PATCH V5 24/29] pci: fix pci_default_write_config(), Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 25/29] pci: add helper functions for pci config write function., Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 20/29] pci: move pci host stuff from pci.c to pci_host.c, Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 06/29] pci: use helper functions to access pci config space., Isaku Yamahata, 2009/10/09
[Qemu-devel] [PATCH V5 19/29] pci: split out ioport address parsing from pci configuration access logic., Isaku Yamahata, 2009/10/09