From: Martin Kaiser Date: Mon, 26 Feb 2024 19:11:59 +0000 (+0100) Subject: lib/test_vmalloc.c: use unsigned long constant X-Git-Tag: for-linus-6.9~305^2~77 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4c4a52544ae03d84ffd3b5e9593833ffe05485a1;p=users%2Fdwmw2%2Flinux.git lib/test_vmalloc.c: use unsigned long constant Use an unsigned long constant instead of an int constant and a cast. This fixes the checkpatch warning WARNING: Unnecessary typecast of c90 int constant - '(unsigned long) 1' could be '1UL' + align = ((unsigned long) 1) << i; Link: https://lkml.kernel.org/r/20240226191159.39509-4-martin@kaiser.cx Signed-off-by: Martin Kaiser Reviewed-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton --- diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c index d0c0cbe1913d7..4ddf769861ff7 100644 --- a/lib/test_vmalloc.c +++ b/lib/test_vmalloc.c @@ -117,7 +117,7 @@ static int align_shift_alloc_test(void) int i; for (i = 0; i < BITS_PER_LONG; i++) { - align = ((unsigned long) 1) << i; + align = 1UL << i; ptr = __vmalloc_node(PAGE_SIZE, align, GFP_KERNEL|__GFP_ZERO, 0, __builtin_return_address(0));