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

[Xen-changelog] [xen master] efi: use ROUNDUP() macro instead of open code



commit 3dec344d89cfe7ab62e680769e73f7975e122454
Author:     Daniel Kiper <daniel.kiper@xxxxxxxxxx>
AuthorDate: Tue Dec 5 17:16:04 2017 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Dec 5 17:16:04 2017 +0100

    efi: use ROUNDUP() macro instead of open code
    
    Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/common/efi/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 01d3300..469bf98 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -176,7 +176,7 @@ static void __init __maybe_unused *ebmalloc(size_t size)
 {
     void *ptr = ebmalloc_mem + ebmalloc_allocated;
 
-    ebmalloc_allocated += (size + sizeof(void *) - 1) & ~(sizeof(void *) - 1);
+    ebmalloc_allocated += ROUNDUP(size, sizeof(void *));
 
     if ( ebmalloc_allocated > sizeof(ebmalloc_mem) )
         blexit(L"Out of static memory\r\n");
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.