On Thu, Jun 06, 2019 at 06:37:04AM -0600, Jan Beulich wrote:
> >>> On 06.06.19 at 11:01, <roger....@citrix.com> wrote:
> > And use an union with the current seg, bus and devfn fields to make
> > fields point to the same underlying data.
> > 
> > No functional change.
> > 
> > Suggested-by: Jan Beulich <jbeul...@suse.com>
> > Signed-off-by: Roger Pau Monné <roger....@citrix.com>
> 
> Acked-by: Jan Beulich <jbeul...@suse.com>
> with one question:
> 
> > --- a/xen/include/xen/pci.h
> > +++ b/xen/include/xen/pci.h
> > @@ -83,9 +83,15 @@ struct pci_dev {
> >      struct arch_msix *msix;
> >  
> >      struct domain *domain;
> > -    const u16 seg;
> > -    const u8 bus;
> > -    const u8 devfn;
> > +
> > +    union {
> > +        struct {
> > +            const uint8_t devfn;
> > +            const uint8_t bus;
> > +            const uint16_t seg;
> > +        };
> > +        const pci_sbdf_t sbdf;
> > +    };
> 
> Doesn't sticking a single "const" at the union have the same effect?

Indeed, and I've already done so, I assume it's fine to keep your Ack.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to