[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 03/12] pci: make PCI_SBDF return a pci_sbdf_t
> -----Original Message----- > From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > Sent: 06 June 2019 12:31 > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx> > Cc: Julien Grall <julien.grall@xxxxxxx>; Andrew Cooper > <Andrew.Cooper3@xxxxxxxxxx>; George Dunlap > <George.Dunlap@xxxxxxxxxx>; Ian Jackson <Ian.Jackson@xxxxxxxxxx>; Roger Pau > Monne > <roger.pau@xxxxxxxxxx>; Kevin Tian <kevin.tian@xxxxxxxxx>; Stefano Stabellini > <sstabellini@xxxxxxxxxx>; xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>; Konrad > Rzeszutek Wilk > <konrad.wilk@xxxxxxxxxx>; Tim (Xen.org) <tim@xxxxxxx>; WeiLiu <wl@xxxxxxx> > Subject: RE: [Xen-devel] [PATCH v2 03/12] pci: make PCI_SBDF return a > pci_sbdf_t > > >>> On 06.06.19 at 13:19, <Paul.Durrant@xxxxxxxxxx> wrote: > >> -----Original Message----- > >> From: Xen-devel [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf > >> Of Paul Durrant > >> Sent: 06 June 2019 12:11 > >> > >> > -----Original Message----- > >> > From: Xen-devel [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On > >> > Behalf Of Roger Pau Monne > >> > Sent: 06 June 2019 10:02 > >> > --- a/xen/include/xen/pci.h > >> > +++ b/xen/include/xen/pci.h > >> > @@ -34,7 +34,8 @@ > >> > #define PCI_DEVFN2(bdf) ((bdf) & 0xff) > >> > #define PCI_BDF(b,d,f) ((((b) & 0xff) << 8) | PCI_DEVFN(d,f)) > >> > #define PCI_BDF2(b,df) ((((b) & 0xff) << 8) | ((df) & 0xff)) > >> > -#define PCI_SBDF(s,b,d,f) ((((s) & 0xffff) << 16) | PCI_BDF(b,d,f)) > >> > +#define PCI_SBDF(s,b,d,f) \ > >> > + ((pci_sbdf_t) { .sbdf = (((s) & 0xffff) << 16) | PCI_BDF(b,d,f) }) > > > > Wouldn't this be better coded along the lines of... > > > > ((pci_sbdf_t) { .seg = s, .bus = b, .dev = d, .fn = f }) > > No, as per the prior version's discussion: Older gcc won't cope with this. Oh, ok. Fair enough then. Paul > > Jan > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |