Skip to content

Commit

Permalink
lib/test_bitmap.c: use ULL suffix for 64-bit constants
Browse files Browse the repository at this point in the history
With gcc 4.1.2:

  lib/test_bitmap.c:189: warning: integer constant is too large for `long' type
  lib/test_bitmap.c:190: warning: integer constant is too large for `long' type
  lib/test_bitmap.c:194: warning: integer constant is too large for `long' type
  lib/test_bitmap.c:195: warning: integer constant is too large for `long' type

Add the missing "ULL" suffix to fix this.

Link: http://lkml.kernel.org/r/[email protected]
Fixes: 60ef690 ("bitmap: introduce BITMAP_FROM_U64()")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Yury Norov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
geertu authored and torvalds committed Sep 14, 2017
1 parent 6dec0dd commit 8185f57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/test_bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ static const unsigned long exp[] __initconst = {
BITMAP_FROM_U64(0x22222222),
BITMAP_FROM_U64(0xffffffff),
BITMAP_FROM_U64(0xfffffffe),
BITMAP_FROM_U64(0x3333333311111111),
BITMAP_FROM_U64(0xffffffff77777777)
BITMAP_FROM_U64(0x3333333311111111ULL),
BITMAP_FROM_U64(0xffffffff77777777ULL)
};

static const unsigned long exp2[] __initconst = {
BITMAP_FROM_U64(0x3333333311111111),
BITMAP_FROM_U64(0xffffffff77777777)
BITMAP_FROM_U64(0x3333333311111111ULL),
BITMAP_FROM_U64(0xffffffff77777777ULL)
};

static const struct test_bitmap_parselist parselist_tests[] __initconst = {
Expand Down

0 comments on commit 8185f57

Please sign in to comment.