From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEPaE-0000L1-HS for qemu-devel@nongnu.org; Wed, 10 Jun 2009 11:19:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEPa9-0000IZ-QM for qemu-devel@nongnu.org; Wed, 10 Jun 2009 11:19:21 -0400 Received: from [199.232.76.173] (port=50114 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEPa9-0000IT-Gr for qemu-devel@nongnu.org; Wed, 10 Jun 2009 11:19:17 -0400 Received: from mx2.redhat.com ([66.187.237.31]:54492) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MEPa9-0004vI-48 for qemu-devel@nongnu.org; Wed, 10 Jun 2009 11:19:17 -0400 Date: Wed, 10 Jun 2009 18:16:19 +0300 From: "Michael S. Tsirkin" Message-ID: <20090610151619.GE28601@redhat.com> References: <1243924970-17545-1-git-send-email-yamahata@valinux.co.jp> <1243924970-17545-5-git-send-email-yamahata@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1243924970-17545-5-git-send-email-yamahata@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH 4/7] pci/config: convert pci configuration space handler to use callback. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, paul@codesourcery.com, avi@redhat.com On Tue, Jun 02, 2009 at 03:42:47PM +0900, Isaku Yamahata wrote: > convert pci configuration space handler into callbacks. > > Signed-off-by: Isaku Yamahata > --- > changes v5 > - typo > - don't change cirrus_vga.c behaviour. > --- > hw/acpi.c | 11 ++++----- > hw/cirrus_vga.c | 15 ++++++++++- > hw/gt64xxx.c | 13 +--------- > hw/piix_pci.c | 18 +++++++++----- > hw/vga.c | 10 +++++--- > hw/wdt_i6300esb.c | 66 +++++++++++++++++++++------------------------------- > 6 files changed, 63 insertions(+), 70 deletions(-) It might be a good idea to split this up, and handle each device in a separate patch. > diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c > index ce3ffe2..0790ef1 100644 > --- a/hw/gt64xxx.c > +++ b/hw/gt64xxx.c > @@ -1083,17 +1083,6 @@ static void gt64120_reset(void *opaque) > gt64120_pci_mapping(s); > } > > -static uint32_t gt64120_read_config(PCIDevice *d, uint32_t address, int len) > -{ > - return pci_default_read_config(d, address, len); > -} > - > -static void gt64120_write_config(PCIDevice *d, uint32_t address, uint32_t val, > - int len) > -{ > - pci_default_write_config(d, address, val, len); > -} > - > static void gt64120_save(QEMUFile* f, void *opaque) > { > PCIDevice *d = opaque; > @@ -1133,7 +1122,7 @@ PCIBus *pci_gt64120_init(qemu_irq *pic) > pic, 144, 4); > s->ISD_handle = cpu_register_io_memory(0, gt64120_read, gt64120_write, s); > d = pci_register_device(s->pci->bus, "GT64120 PCI Bus", sizeof(PCIDevice), > - 0, gt64120_read_config, gt64120_write_config); > + 0, NULL, NULL); > > /* FIXME: Malta specific hw assumptions ahead */ > This seems a trivially correct cleanup that can be done independently of the rest of the series. -- MST