Commit 01bb3485 authored by Russell King (Oracle)'s avatar Russell King (Oracle)
Browse files

ARM: change vmalloc_min to be unsigned long



vmalloc_min is currently a void pointer, but everywhere its used
contains a cast - either to a void pointer when setting or back to
an integer type when being used. Eliminate these casts by changing
its type to unsigned long.

Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarYanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
parent d619f90f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1121,8 +1121,8 @@ void __init debug_ll_io_init(void)
}
#endif

static void * __initdata vmalloc_min =
	(void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET);
static unsigned long __initdata vmalloc_min =
	VMALLOC_END - (240 << 20) - VMALLOC_OFFSET;

/*
 * vmalloc=size forces the vmalloc area to be exactly 'size'
@@ -1145,7 +1145,7 @@ static int __init early_vmalloc(char *arg)
			vmalloc_reserve >> 20);
	}

	vmalloc_min = (void *)(VMALLOC_END - vmalloc_reserve);
	vmalloc_min = VMALLOC_END - vmalloc_reserve;
	return 0;
}
early_param("vmalloc", early_vmalloc);
@@ -1165,7 +1165,7 @@ void __init adjust_lowmem_bounds(void)
	 * and may itself be outside the valid range for which phys_addr_t
	 * and therefore __pa() is defined.
	 */
	vmalloc_limit = (u64)(uintptr_t)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET;
	vmalloc_limit = (u64)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET;

	/*
	 * The first usable region must be PMD aligned. Mark its start