Skip to content

Commit 4c4a525

Browse files
martin-kaiserakpm00
authored andcommitted
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]>
1 parent e2c5bfe commit 4c4a525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/test_vmalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int align_shift_alloc_test(void)
117117
int i;
118118

119119
for (i = 0; i < BITS_PER_LONG; i++) {
120-
align = ((unsigned long) 1) << i;
120+
align = 1UL << i;
121121

122122
ptr = __vmalloc_node(PAGE_SIZE, align, GFP_KERNEL|__GFP_ZERO, 0,
123123
__builtin_return_address(0));

0 commit comments

Comments
 (0)