[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 2/6] pc-bios/s390-ccw: struct tpi_info must be declar
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 2/6] pc-bios/s390-ccw: struct tpi_info must be declared as aligned(4) |
Date: |
Mon, 14 May 2018 17:41:10 +0200 |
From: Thomas Huth <address@hidden>
I've run into a compilation error today with the current version of GCC 8:
In file included from s390-ccw.h:49,
from main.c:12:
cio.h:128:1: error: alignment 1 of 'struct tpi_info' is less than 4
[-Werror=packed-not-aligned]
} __attribute__ ((packed));
^
cc1: all warnings being treated as errors
Since the struct tpi_info contains an element ("struct subchannel_id schid")
which is marked as aligned(4), we've got to mark the struct tpi_info as
aligned(4), too.
CC: address@hidden
Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Acked-by: Christian Borntraeger <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
pc-bios/s390-ccw/cio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc-bios/s390-ccw/cio.h b/pc-bios/s390-ccw/cio.h
index 55eaeee4b6..1a0795f645 100644
--- a/pc-bios/s390-ccw/cio.h
+++ b/pc-bios/s390-ccw/cio.h
@@ -125,7 +125,7 @@ struct tpi_info {
__u32 reserved3 : 12;
__u32 int_type : 3;
__u32 reserved4 : 12;
-} __attribute__ ((packed));
+} __attribute__ ((packed, aligned(4)));
/* channel command word (type 1) */
struct ccw1 {
--
2.14.3
- [qemu-s390x] [PULL 0/6] s390x fixes/cleanups, Cornelia Huck, 2018/05/14
- [qemu-s390x] [PULL 2/6] pc-bios/s390-ccw: struct tpi_info must be declared as aligned(4),
Cornelia Huck <=
- [qemu-s390x] [PULL 1/6] s390x/css: disabled subchannels cannot be status pending, Cornelia Huck, 2018/05/14
- [qemu-s390x] [PULL 3/6] virtio-ccw: common reset handler, Cornelia Huck, 2018/05/14
- [qemu-s390x] [PULL 4/6] s390x/ccw: make sure all ccw devices are properly reset, Cornelia Huck, 2018/05/14
- [qemu-s390x] [PULL 6/6] target/s390x: Fix brace Werror with clang 6.0.0, Cornelia Huck, 2018/05/14
- [qemu-s390x] [PULL 5/6] s390x: refactor reset/reipl handling, Cornelia Huck, 2018/05/14
- Re: [qemu-s390x] [PULL 0/6] s390x fixes/cleanups, Peter Maydell, 2018/05/14