[Skiboot] [PATCH] hdata/i2c: add __packed to the host_i2c_hdr structure

Claudio Carvalho cclaudio at linux.vnet.ibm.com
Thu Oct 12 16:03:23 AEDT 2017

This adds __packed to the host_i2c_hdr structure since it defines an
offset that refers to the beginning of the structure.

Fixes: 41dc3eb4495c451a405974570f604622a3f829ef
Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
 hdata/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hdata/i2c.c b/hdata/i2c.c
index c7f38e9..2e14212 100644
--- a/hdata/i2c.c
+++ b/hdata/i2c.c
@@ -152,7 +152,7 @@ static bool is_zeros(const void *p, size_t size)
 struct host_i2c_hdr {
 	const struct HDIF_array_hdr hdr;
 	__be32 version;
+} __packed;
 int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
 	struct dt_node *xscom)

More information about the Skiboot mailing list