linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: hv: suppress the invalid warning for packed member alignment
@ 2024-04-17  8:00 Saurabh Sengar
  2024-04-17  8:17 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Saurabh Sengar @ 2024-04-17  8:00 UTC (permalink / raw)
  To: kys, haiyangz, wei.liu, decui, gregkh, linux-kernel, linux-hyperv; +Cc: ssengar

Packed struct vmbus_bufring is 4096 byte aligned and the reporting
warning is for the first member of that struct which shouldn't add
any offset to create alignment issue.

Suppress the warning by adding -Wno-address-of-packed-member flag to
gcc.

Reported-by: kernel test robot <yujie.liu@intel.com>
Closes: https://lore.kernel.org/all/202404121913.GhtSoKbW-lkp@intel.com/
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
---
 tools/hv/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/hv/Makefile b/tools/hv/Makefile
index bb52871da341..2e60e2c212cd 100644
--- a/tools/hv/Makefile
+++ b/tools/hv/Makefile
@@ -17,6 +17,7 @@ endif
 MAKEFLAGS += -r
 
 override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
+override CFLAGS += -Wno-address-of-packed-member
 
 ALL_TARGETS := hv_kvp_daemon hv_vss_daemon
 ifneq ($(ARCH), aarch64)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools: hv: suppress the invalid warning for packed member alignment
  2024-04-17  8:00 [PATCH] tools: hv: suppress the invalid warning for packed member alignment Saurabh Sengar
@ 2024-04-17  8:17 ` Greg KH
  2024-04-17  8:21   ` Saurabh Singh Sengar
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2024-04-17  8:17 UTC (permalink / raw)
  To: Saurabh Sengar
  Cc: kys, haiyangz, wei.liu, decui, linux-kernel, linux-hyperv,
	ssengar

On Wed, Apr 17, 2024 at 01:00:48AM -0700, Saurabh Sengar wrote:
> Packed struct vmbus_bufring is 4096 byte aligned and the reporting
> warning is for the first member of that struct which shouldn't add
> any offset to create alignment issue.
> 
> Suppress the warning by adding -Wno-address-of-packed-member flag to
> gcc.
> 
> Reported-by: kernel test robot <yujie.liu@intel.com>
> Closes: https://lore.kernel.org/all/202404121913.GhtSoKbW-lkp@intel.com/
> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>

What commit id does this fix?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools: hv: suppress the invalid warning for packed member alignment
  2024-04-17  8:17 ` Greg KH
@ 2024-04-17  8:21   ` Saurabh Singh Sengar
  2024-05-04 16:47     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Saurabh Singh Sengar @ 2024-04-17  8:21 UTC (permalink / raw)
  To: Greg KH; +Cc: kys, haiyangz, wei.liu, decui, linux-kernel, linux-hyperv,
	ssengar

On Wed, Apr 17, 2024 at 10:17:21AM +0200, Greg KH wrote:
> On Wed, Apr 17, 2024 at 01:00:48AM -0700, Saurabh Sengar wrote:
> > Packed struct vmbus_bufring is 4096 byte aligned and the reporting
> > warning is for the first member of that struct which shouldn't add
> > any offset to create alignment issue.
> > 
> > Suppress the warning by adding -Wno-address-of-packed-member flag to
> > gcc.
> > 
> > Reported-by: kernel test robot <yujie.liu@intel.com>
> > Closes: https://lore.kernel.org/all/202404121913.GhtSoKbW-lkp@intel.com/
> > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> 
> What commit id does this fix?

Fixes: 45bab4d74651 ("tools: hv: Add vmbus_bufring")

- Saurabh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools: hv: suppress the invalid warning for packed member alignment
  2024-04-17  8:21   ` Saurabh Singh Sengar
@ 2024-05-04 16:47     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2024-05-04 16:47 UTC (permalink / raw)
  To: Saurabh Singh Sengar
  Cc: kys, haiyangz, wei.liu, decui, linux-kernel, linux-hyperv,
	ssengar

On Wed, Apr 17, 2024 at 01:21:49AM -0700, Saurabh Singh Sengar wrote:
> On Wed, Apr 17, 2024 at 10:17:21AM +0200, Greg KH wrote:
> > On Wed, Apr 17, 2024 at 01:00:48AM -0700, Saurabh Sengar wrote:
> > > Packed struct vmbus_bufring is 4096 byte aligned and the reporting
> > > warning is for the first member of that struct which shouldn't add
> > > any offset to create alignment issue.
> > > 
> > > Suppress the warning by adding -Wno-address-of-packed-member flag to
> > > gcc.
> > > 
> > > Reported-by: kernel test robot <yujie.liu@intel.com>
> > > Closes: https://lore.kernel.org/all/202404121913.GhtSoKbW-lkp@intel.com/
> > > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> > 
> > What commit id does this fix?
> 
> Fixes: 45bab4d74651 ("tools: hv: Add vmbus_bufring")

Great, please provide that in the next verion of this change you send
out.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-04 16:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-17  8:00 [PATCH] tools: hv: suppress the invalid warning for packed member alignment Saurabh Sengar
2024-04-17  8:17 ` Greg KH
2024-04-17  8:21   ` Saurabh Singh Sengar
2024-05-04 16:47     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).