[PATCH 2/3] scripts/kwbimage: use ALIGN_SUP instead of open-coding it

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Nov 16 01:11:38 PST 2016


---
 scripts/kwbimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kwbimage.c b/scripts/kwbimage.c
index 15726e066a01..57f563ece651 100644
--- a/scripts/kwbimage.c
+++ b/scripts/kwbimage.c
@@ -887,7 +887,7 @@ static void *image_create_v1(struct image_cfg_element *image_cfg,
 		}
 
 		/* payload size must be multiple of 32b */
-		payloadsz = 4 * ((s.st_size + 3)/4);
+		payloadsz = ALIGN_SUP(s.st_size, 4);
 	}
 
 	/* The payload should be aligned on some reasonable
-- 
2.10.2




More information about the barebox mailing list