All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>, WeiLiu <wl@xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCH v2 02/12] pci: introduce a pci_sbdf_t field to pci_dev
Date: Thu, 6 Jun 2019 16:54:18 +0200	[thread overview]
Message-ID: <20190606145418.vfr6rnre2o7rmcfv@Air-de-Roger> (raw)
In-Reply-To: <5CF908F00200007800235F1D@prv1-mh.provo.novell.com>

On Thu, Jun 06, 2019 at 06:37:04AM -0600, Jan Beulich wrote:
> >>> On 06.06.19 at 11:01, <roger.pau@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 <jbeulich@suse.com>
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Acked-by: Jan Beulich <jbeulich@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	other threads:[~2019-06-06 14:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06  9:01 [Xen-devel] [PATCH v2 00/12] pci: expand usage of pci_sbdf_t Roger Pau Monne
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 01/12] pci: introduce a devfn field to pci_sbdf_t Roger Pau Monne
2019-06-06  9:50   ` Paul Durrant
2019-06-06 10:09     ` Jan Beulich
2019-06-06 10:13       ` Roger Pau Monné
2019-06-06 10:22         ` Jan Beulich
2019-06-06 10:28           ` Roger Pau Monné
2019-06-06 10:11     ` Roger Pau Monné
2019-06-06 12:34   ` Jan Beulich
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 02/12] pci: introduce a pci_sbdf_t field to pci_dev Roger Pau Monne
2019-06-06  9:52   ` Paul Durrant
2019-06-06 12:37   ` Jan Beulich
2019-06-06 14:54     ` Roger Pau Monné [this message]
2019-06-06 15:03       ` Jan Beulich
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 03/12] pci: make PCI_SBDF return a pci_sbdf_t Roger Pau Monne
2019-06-06 11:11   ` Paul Durrant
2019-06-06 11:19     ` Paul Durrant
2019-06-06 11:31       ` Jan Beulich
2019-06-06 11:37         ` Paul Durrant
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 04/12] pci: make PCI_SBDF2 " Roger Pau Monne
2019-06-06 11:22   ` Paul Durrant
2019-06-06 16:27     ` Roger Pau Monné
2019-06-06 16:28       ` Paul Durrant
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 05/12] pci: make PCI_SBDF3 " Roger Pau Monne
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 06/12] pci: switch pci_conf_read8 to use pci_sbdf_t Roger Pau Monne
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 07/12] pci: switch pci_conf_read16 " Roger Pau Monne
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 08/12] pci: switch pci_conf_read32 " Roger Pau Monne
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 09/12] pci: switch pci_conf_write8 " Roger Pau Monne
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 10/12] pci: switch pci_conf_write16 " Roger Pau Monne
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 11/12] pci: switch pci_conf_write32 " Roger Pau Monne
2019-06-06  9:01 ` [Xen-devel] [PATCH v2 12/12] print: introduce a format specifier for pci_sbdf_t Roger Pau Monne

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=20190606145418.vfr6rnre2o7rmcfv@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.