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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
Changes since (implicit) v1:
 - add S-o-b

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

diff --git a/scripts/kwbimage.c b/scripts/kwbimage.c
index 79ca85b72d8e..2af96f055c7e 100644
--- a/scripts/kwbimage.c
+++ b/scripts/kwbimage.c
@@ -886,7 +886,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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux