[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v2 2/4] PCI: move pdev_list field to common structure
- To: Jan Beulich <JBeulich@xxxxxxxx>
- From: Julien Grall <julien.grall@xxxxxxx>
- Date: Tue, 4 Jun 2019 14:05:59 +0100
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, WeiLiu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 04 Jun 2019 13:06:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Jan,
On 6/4/19 2:03 PM, Jan Beulich wrote:
On 04.06.19 at 14:55, <julien.grall@xxxxxxx> wrote:
On 6/4/19 1:42 PM, Jan Beulich wrote:
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -121,7 +121,9 @@ struct pci_dev {
};
#define for_each_pdev(domain, pdev) \
- list_for_each_entry(pdev, &(domain->arch.pdev_list), domain_list)
+ list_for_each_entry(pdev, &(domain)->pdev_list, domain_list)
+
+#define has_arch_pdevs(d) (!list_empty(&(d)->pdev_list))
This feels a bit strange to keep "arch" in the macro name when the code
is now generic. How about "domain_has_pdevs"?
Indeed I did notice this oddity too, but if such an adjustment is
to be made then imo not in this patch. After all in turn I'd need
to change all use sites.
It feels to me they are kind of tied together because has_arch_pdevs is
an accessor of the field.
But I am happy to see this in a separate patches.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|