From: Luiz Capitulino <lcapitulino@redhat.com>
To: Anthony Liguori <aliguori@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com
Subject: [Qemu-devel] Re: [PATCH 3/5] PCI: Convert pci_info() to QObject
Date: Thu, 7 Jan 2010 16:00:29 -0200 [thread overview]
Message-ID: <20100107160029.06759f78@doriath> (raw)
In-Reply-To: <4B45FB80.1010902@linux.vnet.ibm.com>
On Thu, 07 Jan 2010 09:19:28 -0600
Anthony Liguori <aliguori@linux.vnet.ibm.com> wrote:
> > -static void pci_info_device(PCIBus *bus, PCIDevice *d)
> > +static void pci_for_each_device_under_bus(PCIBus *bus,
> > + void (*fn)(PCIBus *b, PCIDevice *d))
> > {
> > - Monitor *mon = cur_mon;
> > - int i, class;
> > - PCIIORegion *r;
> > - const pci_class_desc *desc;
> > + PCIDevice *d;
> > + int devfn;
> >
> > - monitor_printf(mon, " Bus %2d, device %3d, function %d:\n",
> > - pci_bus_num(d->bus),
> > - PCI_SLOT(d->devfn), PCI_FUNC(d->devfn));
> > - class = pci_get_word(d->config + PCI_CLASS_DEVICE);
> > + for(devfn = 0; devfn< ARRAY_SIZE(bus->devices); devfn++) {
> > + d = bus->devices[devfn];
> > + if (d)
> > + fn(bus, d);
> > + }
> > +}
> >
>
> Coding style is off. You're missing braces on the if.
Was based on the current code, will fix.
> The conversion otherwise looks good. I'm not sure mem_type_64 is the
> best property name but I'll let mst comment on that. I'd also prefer we
> didn't mix case with BAR and IRQ. I'd rather see us just use bar and irq.
Ok, will fix too.
next prev parent reply other threads:[~2010-01-07 18:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-05 20:34 [Qemu-devel] [PATCH v0 0/5]: Convert pci_info() to QObject Luiz Capitulino
2010-01-05 20:34 ` [Qemu-devel] [PATCH 1/5] QList: Introduce QLIST_FOREACH_ENTRY() Luiz Capitulino
2010-01-05 20:34 ` [Qemu-devel] [PATCH 2/5] QDict: Introduce qdict_get_qdict() Luiz Capitulino
2010-01-05 20:34 ` [Qemu-devel] [PATCH 3/5] PCI: Convert pci_info() to QObject Luiz Capitulino
2010-01-07 15:19 ` [Qemu-devel] " Anthony Liguori
2010-01-07 18:00 ` Luiz Capitulino [this message]
2010-01-05 20:34 ` [Qemu-devel] [PATCH 4/5] PCI: do_pci_info(): PCI bridge support Luiz Capitulino
2010-01-05 20:34 ` [Qemu-devel] [PATCH 5/5] PCI: do_pci_info(): PCI bridge devices support Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100107160029.06759f78@doriath \
--to=lcapitulino@redhat.com \
--cc=aliguori@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.