All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: Dexuan Cui <decui@microsoft.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Michael Kelley <mikelley@microsoft.com>,
	KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Sasha Levin <sashal@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Andrew Murray <andrew.murray@arm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Andrew Murray <amurray@thegoodpenguin.co.uk>
Subject: Re: [PATCH v3 3/3] PCI: hv: Introduce hv_msi_entry
Date: Thu, 13 Feb 2020 15:14:07 +0800	[thread overview]
Message-ID: <20200213071407.GD69108@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net> (raw)
In-Reply-To: <HK0P153MB0148834D630E95D055CE051CBF1A0@HK0P153MB0148.APCP153.PROD.OUTLOOK.COM>

On Thu, Feb 13, 2020 at 04:18:01AM +0000, Dexuan Cui wrote:
> > From: linux-hyperv-owner@vger.kernel.org
> > <linux-hyperv-owner@vger.kernel.org> On Behalf Of Boqun Feng
> > diff --git a/arch/x86/include/asm/hyperv-tlfs.h
> > b/arch/x86/include/asm/hyperv-tlfs.h
> > 
> > +union hv_msi_entry {
> > +	u64 as_uint64;
> > +	struct {
> > +		u32 address;
> > +		u32 data;
> > +	} __packed;
> > +};
> 
> Just a small thing: should we move the __packed to after the "}" of
> the union hv_msi_entry ?
> 

Actually, in TLFS header, it's common to put the "__packed" inside the
union, rather than after the union. It makes sense because union is
different than struct: the alignment requirement of a union is already
decided by the "as_*" member, so no need for "__packed" attribute.

> Reviewed-by: Dexuan Cui <decui@microsoft.com>

Thanks!

Regards,
Boqun

WARNING: multiple messages have this Message-ID (diff)
From: Boqun Feng <boqun.feng@gmail.com>
To: Dexuan Cui <decui@microsoft.com>
Cc: Sasha Levin <sashal@kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michael Kelley <mikelley@microsoft.com>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Andrew Murray <andrew.murray@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	KY Srinivasan <kys@microsoft.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Andrew Murray <amurray@thegoodpenguin.co.uk>
Subject: Re: [PATCH v3 3/3] PCI: hv: Introduce hv_msi_entry
Date: Thu, 13 Feb 2020 15:14:07 +0800	[thread overview]
Message-ID: <20200213071407.GD69108@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net> (raw)
In-Reply-To: <HK0P153MB0148834D630E95D055CE051CBF1A0@HK0P153MB0148.APCP153.PROD.OUTLOOK.COM>

On Thu, Feb 13, 2020 at 04:18:01AM +0000, Dexuan Cui wrote:
> > From: linux-hyperv-owner@vger.kernel.org
> > <linux-hyperv-owner@vger.kernel.org> On Behalf Of Boqun Feng
> > diff --git a/arch/x86/include/asm/hyperv-tlfs.h
> > b/arch/x86/include/asm/hyperv-tlfs.h
> > 
> > +union hv_msi_entry {
> > +	u64 as_uint64;
> > +	struct {
> > +		u32 address;
> > +		u32 data;
> > +	} __packed;
> > +};
> 
> Just a small thing: should we move the __packed to after the "}" of
> the union hv_msi_entry ?
> 

Actually, in TLFS header, it's common to put the "__packed" inside the
union, rather than after the union. It makes sense because union is
different than struct: the alignment requirement of a union is already
decided by the "as_*" member, so no need for "__packed" attribute.

> Reviewed-by: Dexuan Cui <decui@microsoft.com>

Thanks!

Regards,
Boqun

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-02-13  7:14 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10  3:39 [PATCH v3 0/3] PCI: hv: Generify pci-hyperv.c Boqun Feng
2020-02-10  3:39 ` Boqun Feng
2020-02-10  3:39 ` [PATCH v3 1/3] PCI: hv: Move hypercall related definitions into tlfs header Boqun Feng
2020-02-10  3:39   ` Boqun Feng
2020-02-13  4:17   ` Dexuan Cui
2020-02-13  4:17     ` Dexuan Cui
2020-02-10  3:39 ` [PATCH v3 2/3] PCI: hv: Move retarget related structures " Boqun Feng
2020-02-10  3:39   ` Boqun Feng
2020-02-13  4:17   ` Dexuan Cui
2020-02-13  4:17     ` Dexuan Cui
2020-02-13  7:26     ` Boqun Feng
2020-02-13  7:26       ` Boqun Feng
2020-02-13  8:04       ` Dexuan Cui
2020-02-13  8:04         ` Dexuan Cui
2020-02-10  3:39 ` [PATCH v3 3/3] PCI: hv: Introduce hv_msi_entry Boqun Feng
2020-02-10  3:39   ` Boqun Feng
2020-02-13  4:18   ` Dexuan Cui
2020-02-13  4:18     ` Dexuan Cui
2020-02-13  7:14     ` Boqun Feng [this message]
2020-02-13  7:14       ` Boqun Feng
2020-02-13  8:05       ` Dexuan Cui
2020-02-13  8:05         ` Dexuan Cui
2020-02-21  2:33 ` [PATCH v3 0/3] PCI: hv: Generify pci-hyperv.c Boqun Feng
2020-02-21  2:33   ` Boqun Feng
2020-02-21 10:44   ` Lorenzo Pieralisi
2020-02-21 10:44     ` Lorenzo Pieralisi
2020-03-09 14:35     ` Boqun Feng
2020-03-09 14:35       ` Boqun Feng
2020-03-09 15:03       ` Lorenzo Pieralisi
2020-03-09 15:03         ` Lorenzo Pieralisi

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=20200213071407.GD69108@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net \
    --to=boqun.feng@gmail.com \
    --cc=amurray@thegoodpenguin.co.uk \
    --cc=andrew.murray@arm.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=kys@microsoft.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mikelley@microsoft.com \
    --cc=mingo@redhat.com \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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.