tool: use ALIGN() to align the size
Use the ALIGN() for size align so that the code is more readable.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
diff --git a/tools/socfpgaimage.c b/tools/socfpgaimage.c
index 8fa0983..6dfd64e 100644
--- a/tools/socfpgaimage.c
+++ b/tools/socfpgaimage.c
@@ -203,7 +203,7 @@
uint32_t calc_crc;
/* Align the length up */
- len = (len + 3) & ~3;
+ len = ALIGN(len, 4);
/* Build header, adding 4 bytes to length to hold the CRC32. */
sfp_build_header(buf + HEADER_OFFSET, ver, flags, len + 4);