linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] tools: hv: suppress the invalid warning for packed member alignment
@ 2024-07-05  8:47 Saurabh Sengar
  2024-07-05  8:51 ` Saurabh Singh Sengar
  0 siblings, 1 reply; 2+ messages in thread
From: Saurabh Sengar @ 2024-07-05  8:47 UTC (permalink / raw)
  To: akpm, linux-mm, linux-kernel; +Cc: ssengar, wei.liu

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.

Fixes: 45bab4d74651 ("tools: hv: Add vmbus_bufring")
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>
---
[V2] Added 'Fixes' tag

 tools/hv/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/hv/Makefile b/tools/hv/Makefile
index bb52871..2e60e2c 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)
-- 
1.8.3.1



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

* RE: [PATCH v2] tools: hv: suppress the invalid warning for packed member alignment
  2024-07-05  8:47 [PATCH v2] tools: hv: suppress the invalid warning for packed member alignment Saurabh Sengar
@ 2024-07-05  8:51 ` Saurabh Singh Sengar
  0 siblings, 0 replies; 2+ messages in thread
From: Saurabh Singh Sengar @ 2024-07-05  8:51 UTC (permalink / raw)
  To: Saurabh Sengar, akpm, linux-mm, linux-kernel; +Cc: wei.liu


> -----Original Message-----
> From: Saurabh Sengar <ssengar@linux.microsoft.com>
> Sent: Friday, July 5, 2024 2:17 PM
> To: akpm@linux-foundation.org; linux-mm@kvack.org; linux-
> kernel@vger.kernel.org
> Cc: Saurabh Singh Sengar <ssengar@microsoft.com>; wei.liu@kernel.org
> Subject: [PATCH v2] tools: hv: suppress the invalid warning for packed
> member alignment
> 


Please disregard this email, sent by mistake.


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

end of thread, other threads:[~2024-07-05  8:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-05  8:47 [PATCH v2] tools: hv: suppress the invalid warning for packed member alignment Saurabh Sengar
2024-07-05  8:51 ` Saurabh Singh Sengar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox