Commit 61d130f2 authored by Ard Biesheuvel's avatar Ard Biesheuvel

efi/libstub: Cast away type warning in use of max()

Avoid a type mismatch warning in max() by switching to max_t() and
providing the type explicitly.

Fixes: 3cb4a482 ("efi/libstub: fix efi_random_alloc() ...")
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent d21f5a59
......@@ -120,7 +120,7 @@ efi_status_t efi_random_alloc(unsigned long size,
continue;
}
target = round_up(max(md->phys_addr, alloc_min), align) + target_slot * align;
target = round_up(max_t(u64, md->phys_addr, alloc_min), align) + target_slot * align;
pages = size / EFI_PAGE_SIZE;
status = efi_bs_call(allocate_pages, EFI_ALLOCATE_ADDRESS,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment