summaryrefslogtreecommitdiff
path: root/tools/kwboot.c
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-07-23 12:14:14 +0300
committerStefan Roese <sr@denx.de>2021-07-31 10:49:31 +0300
commita107c61b4180fb5bfe7d0044a25d6db829b8b00f (patch)
treefdc688f515b5f29cbc6d2c42b3b48c54d3533e61 /tools/kwboot.c
parentb4f3cc2c42d97967a3a3c8796c340f6b07ecccac (diff)
downloadu-boot-a107c61b4180fb5bfe7d0044a25d6db829b8b00f.tar.xz
tools: kwbimage: Mark all BootROM structures __packed
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 <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools/kwboot.c')
-rw-r--r--tools/kwboot.c8
1 files changed, 1 insertions, 7 deletions
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 <sys/mman.h>
#include <sys/stat.h>
-#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 */