Skip to content

Commit c21dd8a

Browse files
andy-shevtorvalds
authored andcommitted
lib/test_bitmap: move exp1 and exp2 upper for others to use
Some test cases may re-use predefined exp1 and exp2 bitmaps. Move them upper in the file. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Cc: Bartosz Golaszewski <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Thomas Petazzoni <[email protected]> Cc: William Breathitt Gray <[email protected]> Cc: Yury Norov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 0ee312e commit c21dd8a

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

lib/test_bitmap.c

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,26 @@ static unsigned failed_tests __initdata;
2121

2222
static char pbl_buffer[PAGE_SIZE] __initdata;
2323

24+
static const unsigned long exp1[] __initconst = {
25+
BITMAP_FROM_U64(1),
26+
BITMAP_FROM_U64(2),
27+
BITMAP_FROM_U64(0x0000ffff),
28+
BITMAP_FROM_U64(0xffff0000),
29+
BITMAP_FROM_U64(0x55555555),
30+
BITMAP_FROM_U64(0xaaaaaaaa),
31+
BITMAP_FROM_U64(0x11111111),
32+
BITMAP_FROM_U64(0x22222222),
33+
BITMAP_FROM_U64(0xffffffff),
34+
BITMAP_FROM_U64(0xfffffffe),
35+
BITMAP_FROM_U64(0x3333333311111111ULL),
36+
BITMAP_FROM_U64(0xffffffff77777777ULL),
37+
BITMAP_FROM_U64(0),
38+
};
39+
40+
static const unsigned long exp2[] __initconst = {
41+
BITMAP_FROM_U64(0x3333333311111111ULL),
42+
BITMAP_FROM_U64(0xffffffff77777777ULL),
43+
};
2444

2545
static bool __init
2646
__check_eq_uint(const char *srcfile, unsigned int line,
@@ -247,27 +267,6 @@ struct test_bitmap_parselist{
247267
const int flags;
248268
};
249269

250-
static const unsigned long exp1[] __initconst = {
251-
BITMAP_FROM_U64(1),
252-
BITMAP_FROM_U64(2),
253-
BITMAP_FROM_U64(0x0000ffff),
254-
BITMAP_FROM_U64(0xffff0000),
255-
BITMAP_FROM_U64(0x55555555),
256-
BITMAP_FROM_U64(0xaaaaaaaa),
257-
BITMAP_FROM_U64(0x11111111),
258-
BITMAP_FROM_U64(0x22222222),
259-
BITMAP_FROM_U64(0xffffffff),
260-
BITMAP_FROM_U64(0xfffffffe),
261-
BITMAP_FROM_U64(0x3333333311111111ULL),
262-
BITMAP_FROM_U64(0xffffffff77777777ULL),
263-
BITMAP_FROM_U64(0),
264-
};
265-
266-
static const unsigned long exp2[] __initconst = {
267-
BITMAP_FROM_U64(0x3333333311111111ULL),
268-
BITMAP_FROM_U64(0xffffffff77777777ULL)
269-
};
270-
271270
static const struct test_bitmap_parselist parselist_tests[] __initconst = {
272271
#define step (sizeof(u64) / sizeof(unsigned long))
273272

0 commit comments

Comments
 (0)