From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7t8y-0000Fk-64 for qemu-devel@nongnu.org; Tue, 10 Nov 2009 11:00:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7t8t-0000DW-Gi for qemu-devel@nongnu.org; Tue, 10 Nov 2009 11:00:31 -0500 Received: from [199.232.76.173] (port=48016 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7t8t-0000DN-CZ for qemu-devel@nongnu.org; Tue, 10 Nov 2009 11:00:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3744) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N7t8s-000872-Ph for qemu-devel@nongnu.org; Tue, 10 Nov 2009 11:00:27 -0500 Date: Tue, 10 Nov 2009 17:57:43 +0200 From: "Michael S. Tsirkin" Message-ID: <20091110155743.GD20819@redhat.com> References: <1256905286-25435-1-git-send-email-yamahata@valinux.co.jp> <1256905286-25435-23-git-send-email-yamahata@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1256905286-25435-23-git-send-email-yamahata@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH V6 22/32] pci_host: change the signature of pci_data_{read, write}. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org On Fri, Oct 30, 2009 at 09:21:16PM +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 > Acked-by: Michael S. Tsirkin Maybe you can float this patch up so I can apply it to pci tree. > --- > 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 b16f8f8..4f4266d 100644 > --- a/hw/pci.h > +++ b/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); > diff --git a/hw/pci_host.c b/hw/pci_host.c > index 351ade4..f4518dc 100644 > --- a/hw/pci_host.c > +++ b/hw/pci_host.c > @@ -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; > -- > 1.6.0.2 > >