From f25c11236a68f4e850f1855e84de1d3c8ef872b7 Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Sun, 11 Sep 2022 12:18:46 +0200 Subject: [PATCH] tests/lib/coreboot_table-test.c: Use ALIGN_UP macro Signed-off-by: Elyes Haouas Change-Id: Ie0d4788c0a4ffee2f16bcf05e3454dbaeaa1606b Reviewed-on: https://review.coreboot.org/c/coreboot/+/67518 Tested-by: build bot (Jenkins) Reviewed-by: Jakub Czapiga --- tests/lib/coreboot_table-test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/lib/coreboot_table-test.c b/tests/lib/coreboot_table-test.c index 2bf1f61da0..20438efa74 100644 --- a/tests/lib/coreboot_table-test.c +++ b/tests/lib/coreboot_table-test.c @@ -20,8 +20,7 @@ static struct lb_header *lb_table_init(unsigned long addr) struct lb_header *header; /* 16 byte align the address */ - addr += 15; - addr &= ~15; + addr = ALIGN_UP(addr, 16); header = (void *)addr; header->signature[0] = 'L';