Message ID | 20200703115109.39139-2-imbrenda@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | More lib/alloc cleanup and a minor improvement | expand |
diff --git a/lib/vmalloc.c b/lib/vmalloc.c index 10f15af..9237a0f 100644 --- a/lib/vmalloc.c +++ b/lib/vmalloc.c @@ -40,7 +40,7 @@ void *alloc_vpage(void) void *vmap(phys_addr_t phys, size_t size) { void *mem, *p; - unsigned pages; + size_t pages; size = PAGE_ALIGN(size); pages = size / PAGE_SIZE; @@ -58,7 +58,7 @@ void *vmap(phys_addr_t phys, size_t size) static void *vm_memalign(size_t alignment, size_t size) { void *mem, *p; - unsigned pages; + size_t pages; assert(alignment <= PAGE_SIZE); size = PAGE_ALIGN(size);
Since size is of type size_t, size >> PAGE_SHIFT might still be too big for a normal unsigned int. Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> --- lib/vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)