[Skiboot] [PATCH] struct p9_sbe_msg doesn't need to be packed

Stewart Smith stewart at linux.ibm.com
Tue Jun 18 15:48:48 AEST 2019


Only the reg member is sent anywhere (via xscom_write), so the structure
does not need to be packed.

Fixes GCC9 build problem:
hw/sbe-p9.c: In function ‘p9_sbe_msg_send’:
hw/sbe-p9.c:270:9: error: taking address of packed member of ‘struct p9_sbe_msg’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
  270 |  data = &msg->reg[0];
      |         ^~~~~~~~~~~~

Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 include/sbe-p9.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/sbe-p9.h b/include/sbe-p9.h
index 4b839d8ba22b..5ad0422ac91a 100644
--- a/include/sbe-p9.h
+++ b/include/sbe-p9.h
@@ -205,7 +205,7 @@ struct p9_sbe_msg {
 
 	/* Internal queuing */
 	struct list_node	link;
-} __packed;
+};
 
 
 /* Allocate and populate p9_sbe_msg structure */
-- 
2.21.0



More information about the Skiboot mailing list