From: Heinrich Schuchardt Date: Sun, 17 Jan 2021 06:52:09 +0000 (+0100) Subject: efi_loader: efi_size_in_pages() missing parentheses X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/%7B%7B?a=commitdiff_plain;h=0a7e5165ec21d8092565a833211b21b356195398;p=u-boot.git efi_loader: efi_size_in_pages() missing parentheses Add parentheses around size to avoid possible operator precedence problems. Signed-off-by: Heinrich Schuchardt --- diff --git a/include/efi_loader.h b/include/efi_loader.h index f759cfe287..f470bbd636 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -561,7 +561,7 @@ struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp); * @size: size in bytes * Return: size in pages */ -#define efi_size_in_pages(size) ((size + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT) +#define efi_size_in_pages(size) (((size) + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT) /* Generic EFI memory allocator, call this to get memory */ void *efi_alloc(uint64_t len, int memory_type); /* More specific EFI memory allocator, called by EFI payloads */