aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_vmalloc.c
diff options
context:
space:
mode:
authorMartin Kaiser <[email protected]>2024-02-26 19:11:59 +0000
committerAndrew Morton <[email protected]>2024-03-05 01:01:22 +0000
commit4c4a52544ae03d84ffd3b5e9593833ffe05485a1 (patch)
tree87c9ee7f62ee9e197dc38a9faf10e7f69cd4e5e1 /lib/test_vmalloc.c
parentlib/test_vmalloc.c: drop empty exit function (diff)
downloadkernel-4c4a52544ae03d84ffd3b5e9593833ffe05485a1.tar.gz
kernel-4c4a52544ae03d84ffd3b5e9593833ffe05485a1.zip
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/[email protected] Signed-off-by: Martin Kaiser <[email protected]> Reviewed-by: Uladzislau Rezki (Sony) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/test_vmalloc.c')
-rw-r--r--lib/test_vmalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c
index d0c0cbe1913d..4ddf769861ff 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));