From a107c61b4180fb5bfe7d0044a25d6db829b8b00f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Fri, 23 Jul 2021 11:14:14 +0200 Subject: tools: kwbimage: Mark all BootROM structures __packed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These structures must have specific size without padding, so mark them as packed via the de-facto standard macro __packed. Also replace PACKED macro. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Stefan Roese --- tools/kwboot.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tools/kwboot.c') diff --git a/tools/kwboot.c b/tools/kwboot.c index 4be094c9c8..2683e5360c 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -26,12 +26,6 @@ #include #include -#ifdef __GNUC__ -#define PACKED __attribute((packed)) -#else -#define PACKED -#endif - /* * Marvell BootROM UART Sensing */ @@ -68,7 +62,7 @@ struct kwboot_block { uint8_t _pnum; uint8_t data[128]; uint8_t csum; -} PACKED; +} __packed; #define KWBOOT_BLK_RSP_TIMEO 1000 /* ms */ -- cgit v1.2.3