* [Qemu-devel] [PATCH] remove unused field from pci device.
@ 2009-06-08 12:02 Gleb Natapov
2009-06-08 17:31 ` Blue Swirl
2009-06-09 2:59 ` Isaku Yamahata
0 siblings, 2 replies; 5+ messages in thread
From: Gleb Natapov @ 2009-06-08 12:02 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/hw/pci.c b/hw/pci.c
index 0ab5b94..02b335f 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -268,7 +268,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
config_write = pci_default_write_config;
pci_dev->config_read = config_read;
pci_dev->config_write = config_write;
- pci_dev->irq_index = pci_irq_index++;
+ pci_irq_index++;
bus->devices[devfn] = pci_dev;
pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4);
return pci_dev;
diff --git a/hw/pci.h b/hw/pci.h
index 0405837..fb7b89a 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -154,8 +154,6 @@ struct PCIDevice {
PCIConfigReadFunc *config_read;
PCIConfigWriteFunc *config_write;
PCIUnregisterFunc *unregister;
- /* ??? This is a PC-specific hack, and should be removed. */
- int irq_index;
/* IRQ objects for the INTA-INTD pins. */
qemu_irq *irq;
--
Gleb.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] remove unused field from pci device.
2009-06-08 12:02 [Qemu-devel] [PATCH] remove unused field from pci device Gleb Natapov
@ 2009-06-08 17:31 ` Blue Swirl
2009-06-08 17:36 ` Gleb Natapov
2009-06-09 2:59 ` Isaku Yamahata
1 sibling, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2009-06-08 17:31 UTC (permalink / raw)
To: Gleb Natapov; +Cc: qemu-devel
On 6/8/09, Gleb Natapov <gleb@redhat.com> wrote:
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/hw/pci.c b/hw/pci.c
> index 0ab5b94..02b335f 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -268,7 +268,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
> config_write = pci_default_write_config;
> pci_dev->config_read = config_read;
> pci_dev->config_write = config_write;
> - pci_dev->irq_index = pci_irq_index++;
> + pci_irq_index++;
> bus->devices[devfn] = pci_dev;
> pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4);
> return pci_dev;
> diff --git a/hw/pci.h b/hw/pci.h
> index 0405837..fb7b89a 100644
> --- a/hw/pci.h
> +++ b/hw/pci.h
> @@ -154,8 +154,6 @@ struct PCIDevice {
> PCIConfigReadFunc *config_read;
> PCIConfigWriteFunc *config_write;
> PCIUnregisterFunc *unregister;
> - /* ??? This is a PC-specific hack, and should be removed. */
> - int irq_index;
>
> /* IRQ objects for the INTA-INTD pins. */
> qemu_irq *irq;
After the patch, pci_irq_index no longer tracks irqs but how many PCI
devices there are in the system, so perhaps it should be renamed as
well.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] remove unused field from pci device.
2009-06-08 17:31 ` Blue Swirl
@ 2009-06-08 17:36 ` Gleb Natapov
2009-06-08 17:40 ` Blue Swirl
0 siblings, 1 reply; 5+ messages in thread
From: Gleb Natapov @ 2009-06-08 17:36 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Mon, Jun 08, 2009 at 08:31:09PM +0300, Blue Swirl wrote:
> On 6/8/09, Gleb Natapov <gleb@redhat.com> wrote:
> > Signed-off-by: Gleb Natapov <gleb@redhat.com>
> > diff --git a/hw/pci.c b/hw/pci.c
> > index 0ab5b94..02b335f 100644
> > --- a/hw/pci.c
> > +++ b/hw/pci.c
> > @@ -268,7 +268,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
> > config_write = pci_default_write_config;
> > pci_dev->config_read = config_read;
> > pci_dev->config_write = config_write;
> > - pci_dev->irq_index = pci_irq_index++;
> > + pci_irq_index++;
> > bus->devices[devfn] = pci_dev;
> > pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4);
> > return pci_dev;
> > diff --git a/hw/pci.h b/hw/pci.h
> > index 0405837..fb7b89a 100644
> > --- a/hw/pci.h
> > +++ b/hw/pci.h
> > @@ -154,8 +154,6 @@ struct PCIDevice {
> > PCIConfigReadFunc *config_read;
> > PCIConfigWriteFunc *config_write;
> > PCIUnregisterFunc *unregister;
> > - /* ??? This is a PC-specific hack, and should be removed. */
> > - int irq_index;
> >
> > /* IRQ objects for the INTA-INTD pins. */
> > qemu_irq *irq;
>
> After the patch, pci_irq_index no longer tracks irqs but how many PCI
> devices there are in the system, so perhaps it should be renamed as
> well.
pci_irq_index tracked the number of PCI devices before this patch too
since irq_index is unused anyway. Do you want me to resend the patch
with renaming or do renaming in separate patch?
--
Gleb.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] remove unused field from pci device.
2009-06-08 17:36 ` Gleb Natapov
@ 2009-06-08 17:40 ` Blue Swirl
0 siblings, 0 replies; 5+ messages in thread
From: Blue Swirl @ 2009-06-08 17:40 UTC (permalink / raw)
To: Gleb Natapov; +Cc: qemu-devel
On 6/8/09, Gleb Natapov <gleb@redhat.com> wrote:
> On Mon, Jun 08, 2009 at 08:31:09PM +0300, Blue Swirl wrote:
> > On 6/8/09, Gleb Natapov <gleb@redhat.com> wrote:
> > > Signed-off-by: Gleb Natapov <gleb@redhat.com>
> > > diff --git a/hw/pci.c b/hw/pci.c
> > > index 0ab5b94..02b335f 100644
> > > --- a/hw/pci.c
> > > +++ b/hw/pci.c
> > > @@ -268,7 +268,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
> > > config_write = pci_default_write_config;
> > > pci_dev->config_read = config_read;
> > > pci_dev->config_write = config_write;
> > > - pci_dev->irq_index = pci_irq_index++;
> > > + pci_irq_index++;
> > > bus->devices[devfn] = pci_dev;
> > > pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4);
> > > return pci_dev;
> > > diff --git a/hw/pci.h b/hw/pci.h
> > > index 0405837..fb7b89a 100644
> > > --- a/hw/pci.h
> > > +++ b/hw/pci.h
> > > @@ -154,8 +154,6 @@ struct PCIDevice {
> > > PCIConfigReadFunc *config_read;
> > > PCIConfigWriteFunc *config_write;
> > > PCIUnregisterFunc *unregister;
> > > - /* ??? This is a PC-specific hack, and should be removed. */
> > > - int irq_index;
> > >
> > > /* IRQ objects for the INTA-INTD pins. */
> > > qemu_irq *irq;
> >
> > After the patch, pci_irq_index no longer tracks irqs but how many PCI
> > devices there are in the system, so perhaps it should be renamed as
> > well.
>
> pci_irq_index tracked the number of PCI devices before this patch too
> since irq_index is unused anyway. Do you want me to resend the patch
> with renaming or do renaming in separate patch?
I guess it does not affect bisectability if you also do renaming in
the same patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] remove unused field from pci device.
2009-06-08 12:02 [Qemu-devel] [PATCH] remove unused field from pci device Gleb Natapov
2009-06-08 17:31 ` Blue Swirl
@ 2009-06-09 2:59 ` Isaku Yamahata
1 sibling, 0 replies; 5+ messages in thread
From: Isaku Yamahata @ 2009-06-09 2:59 UTC (permalink / raw)
To: Gleb Natapov; +Cc: qemu-devel
Hi. As qdev has been introduced, the member PCIBus *bus becomes
also unnecessary because qdev layer tracks bus-device relation.
I already sent a patch to clean it up, I haven't got any reply.
http://lists.gnu.org/archive/html/qemu-devel/2009-06/msg00031.html
If such a patch is acceptable, I'm willing to rebase it and send it out.
Is the patch wanted?
On Mon, Jun 08, 2009 at 03:02:29PM +0300, Gleb Natapov wrote:
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/hw/pci.c b/hw/pci.c
> index 0ab5b94..02b335f 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -268,7 +268,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
> config_write = pci_default_write_config;
> pci_dev->config_read = config_read;
> pci_dev->config_write = config_write;
> - pci_dev->irq_index = pci_irq_index++;
> + pci_irq_index++;
> bus->devices[devfn] = pci_dev;
> pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4);
> return pci_dev;
> diff --git a/hw/pci.h b/hw/pci.h
> index 0405837..fb7b89a 100644
> --- a/hw/pci.h
> +++ b/hw/pci.h
> @@ -154,8 +154,6 @@ struct PCIDevice {
> PCIConfigReadFunc *config_read;
> PCIConfigWriteFunc *config_write;
> PCIUnregisterFunc *unregister;
> - /* ??? This is a PC-specific hack, and should be removed. */
> - int irq_index;
>
> /* IRQ objects for the INTA-INTD pins. */
> qemu_irq *irq;
--
yamahata
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-06-09 3:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08 12:02 [Qemu-devel] [PATCH] remove unused field from pci device Gleb Natapov
2009-06-08 17:31 ` Blue Swirl
2009-06-08 17:36 ` Gleb Natapov
2009-06-08 17:40 ` Blue Swirl
2009-06-09 2:59 ` Isaku Yamahata
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).