All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] pci_host: Drop write-only address_space field
@ 2013-03-01 16:57 Peter Maydell
  2013-03-01 18:33 ` Andreas Färber
  2013-03-04 10:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Maydell @ 2013-03-01 16:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael S. Tsirkin, Andreas Färber, patches

The address_space field of PCIHostState was only ever written, never used.
Drop it completely.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Noticed this when looking at converting versatile_pci to be a subclass
of pci_host; it's nice to be able to drop the ugly fishing around in
the object struct that the two users here were doing...

 hw/pci/pci_host.h |    1 -
 hw/piix_pci.c     |    1 -
 hw/ppc/prep.c     |    1 -
 3 files changed, 3 deletions(-)

diff --git a/hw/pci/pci_host.h b/hw/pci/pci_host.h
index 1845d4d..236cd0f 100644
--- a/hw/pci/pci_host.h
+++ b/hw/pci/pci_host.h
@@ -40,7 +40,6 @@ struct PCIHostState {
     MemoryRegion conf_mem;
     MemoryRegion data_mem;
     MemoryRegion mmcfg;
-    MemoryRegion *address_space;
     uint32_t config_reg;
     PCIBus *bus;
 };
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 6c77e49..9246983 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -244,7 +244,6 @@ static PCIBus *i440fx_common_init(const char *device_name,
 
     dev = qdev_create(NULL, "i440FX-pcihost");
     s = PCI_HOST_BRIDGE(dev);
-    s->address_space = address_space_mem;
     b = pci_bus_new(dev, NULL, pci_address_space,
                     address_space_io, 0);
     s->bus = b;
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index e06dded..2920911 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -567,7 +567,6 @@ static void ppc_prep_init(QEMUMachineInitArgs *args)
 
     dev = qdev_create(NULL, "raven-pcihost");
     pcihost = PCI_HOST_BRIDGE(dev);
-    pcihost->address_space = get_system_memory();
     object_property_add_child(qdev_get_machine(), "raven", OBJECT(dev), NULL);
     qdev_init_nofail(dev);
     pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] pci_host: Drop write-only address_space field
  2013-03-01 16:57 [Qemu-devel] [PATCH] pci_host: Drop write-only address_space field Peter Maydell
@ 2013-03-01 18:33 ` Andreas Färber
  2013-03-01 18:50   ` Peter Maydell
  2013-03-04 10:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2013-03-01 18:33 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, Michael S. Tsirkin, qemu-devel, patches

Am 01.03.2013 17:57, schrieb Peter Maydell:
> The address_space field of PCIHostState was only ever written, never used.
> Drop it completely.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Andreas Färber <afaerber@suse.de>

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] pci_host: Drop write-only address_space field
  2013-03-01 18:33 ` Andreas Färber
@ 2013-03-01 18:50   ` Peter Maydell
  2013-03-01 18:57     ` Andreas Färber
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2013-03-01 18:50 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-trivial, Michael S. Tsirkin, qemu-devel, patches

On 1 March 2013 18:33, Andreas Färber <afaerber@suse.de> wrote:
> Am 01.03.2013 17:57, schrieb Peter Maydell:
>> The address_space field of PCIHostState was only ever written, never used.
>> Drop it completely.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>
> Reviewed-by: Andreas Färber <afaerber@suse.de>

Incidentally I suspect you could if you liked get rid of all
the uses of PCIHostState in prep.c (and the #include of pci_host.h),
since it's now only using &pcihost->busdev as an opaque way of
saying SYS_BUS_DEVICE(dev)).

-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] pci_host: Drop write-only address_space field
  2013-03-01 18:50   ` Peter Maydell
@ 2013-03-01 18:57     ` Andreas Färber
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Färber @ 2013-03-01 18:57 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, Michael S. Tsirkin, qemu-devel, patches

Am 01.03.2013 19:50, schrieb Peter Maydell:
> On 1 March 2013 18:33, Andreas Färber <afaerber@suse.de> wrote:
>> Am 01.03.2013 17:57, schrieb Peter Maydell:
>>> The address_space field of PCIHostState was only ever written, never used.
>>> Drop it completely.
>>>
>>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>
>> Reviewed-by: Andreas Färber <afaerber@suse.de>
> 
> Incidentally I suspect you could if you liked get rid of all
> the uses of PCIHostState in prep.c (and the #include of pci_host.h),
> since it's now only using &pcihost->busdev as an opaque way of
> saying SYS_BUS_DEVICE(dev)).

I believe I do have PCI_DEVICE() and ISA_BUS() changes in my tree. :)

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] pci_host: Drop write-only address_space field
  2013-03-01 16:57 [Qemu-devel] [PATCH] pci_host: Drop write-only address_space field Peter Maydell
  2013-03-01 18:33 ` Andreas Färber
@ 2013-03-04 10:58 ` Stefan Hajnoczi
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2013-03-04 10:58 UTC (permalink / raw)
  To: Peter Maydell
  Cc: qemu-trivial, patches, qemu-devel, Andreas Färber,
	Michael S. Tsirkin

On Fri, Mar 01, 2013 at 04:57:41PM +0000, Peter Maydell wrote:
> The address_space field of PCIHostState was only ever written, never used.
> Drop it completely.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Noticed this when looking at converting versatile_pci to be a subclass
> of pci_host; it's nice to be able to drop the ugly fishing around in
> the object struct that the two users here were doing...
> 
>  hw/pci/pci_host.h |    1 -
>  hw/piix_pci.c     |    1 -
>  hw/ppc/prep.c     |    1 -
>  3 files changed, 3 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-04 10:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 16:57 [Qemu-devel] [PATCH] pci_host: Drop write-only address_space field Peter Maydell
2013-03-01 18:33 ` Andreas Färber
2013-03-01 18:50   ` Peter Maydell
2013-03-01 18:57     ` Andreas Färber
2013-03-04 10:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.