Skip to content

Commit 0ee312e

Browse files
andy-shevtorvalds
authored andcommitted
lib/test_bitmap: rename exp to exp1 to avoid ambiguous name
One function is using exp as local variable. Avoid ambiguous naming by rename global one to exp1. 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 a4881d1 commit 0ee312e

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

lib/test_bitmap.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ struct test_bitmap_parselist{
247247
const int flags;
248248
};
249249

250-
static const unsigned long exp[] __initconst = {
250+
static const unsigned long exp1[] __initconst = {
251251
BITMAP_FROM_U64(1),
252252
BITMAP_FROM_U64(2),
253253
BITMAP_FROM_U64(0x0000ffff),
@@ -271,29 +271,29 @@ static const unsigned long exp2[] __initconst = {
271271
static const struct test_bitmap_parselist parselist_tests[] __initconst = {
272272
#define step (sizeof(u64) / sizeof(unsigned long))
273273

274-
{0, "0", &exp[0], 8, 0},
275-
{0, "1", &exp[1 * step], 8, 0},
276-
{0, "0-15", &exp[2 * step], 32, 0},
277-
{0, "16-31", &exp[3 * step], 32, 0},
278-
{0, "0-31:1/2", &exp[4 * step], 32, 0},
279-
{0, "1-31:1/2", &exp[5 * step], 32, 0},
280-
{0, "0-31:1/4", &exp[6 * step], 32, 0},
281-
{0, "1-31:1/4", &exp[7 * step], 32, 0},
282-
{0, "0-31:4/4", &exp[8 * step], 32, 0},
283-
{0, "1-31:4/4", &exp[9 * step], 32, 0},
284-
{0, "0-31:1/4,32-63:2/4", &exp[10 * step], 64, 0},
285-
{0, "0-31:3/4,32-63:4/4", &exp[11 * step], 64, 0},
286-
{0, " ,, 0-31:3/4 ,, 32-63:4/4 ,, ", &exp[11 * step], 64, 0},
274+
{0, "0", &exp1[0], 8, 0},
275+
{0, "1", &exp1[1 * step], 8, 0},
276+
{0, "0-15", &exp1[2 * step], 32, 0},
277+
{0, "16-31", &exp1[3 * step], 32, 0},
278+
{0, "0-31:1/2", &exp1[4 * step], 32, 0},
279+
{0, "1-31:1/2", &exp1[5 * step], 32, 0},
280+
{0, "0-31:1/4", &exp1[6 * step], 32, 0},
281+
{0, "1-31:1/4", &exp1[7 * step], 32, 0},
282+
{0, "0-31:4/4", &exp1[8 * step], 32, 0},
283+
{0, "1-31:4/4", &exp1[9 * step], 32, 0},
284+
{0, "0-31:1/4,32-63:2/4", &exp1[10 * step], 64, 0},
285+
{0, "0-31:3/4,32-63:4/4", &exp1[11 * step], 64, 0},
286+
{0, " ,, 0-31:3/4 ,, 32-63:4/4 ,, ", &exp1[11 * step], 64, 0},
287287

288288
{0, "0-31:1/4,32-63:2/4,64-95:3/4,96-127:4/4", exp2, 128, 0},
289289

290290
{0, "0-2047:128/256", NULL, 2048, PARSE_TIME},
291291

292-
{0, "", &exp[12 * step], 8, 0},
293-
{0, "\n", &exp[12 * step], 8, 0},
294-
{0, ",, ,, , , ,", &exp[12 * step], 8, 0},
295-
{0, " , ,, , , ", &exp[12 * step], 8, 0},
296-
{0, " , ,, , , \n", &exp[12 * step], 8, 0},
292+
{0, "", &exp1[12 * step], 8, 0},
293+
{0, "\n", &exp1[12 * step], 8, 0},
294+
{0, ",, ,, , , ,", &exp1[12 * step], 8, 0},
295+
{0, " , ,, , , ", &exp1[12 * step], 8, 0},
296+
{0, " , ,, , , \n", &exp1[12 * step], 8, 0},
297297

298298
{-EINVAL, "-1", NULL, 8, 0},
299299
{-EINVAL, "-0", NULL, 8, 0},
@@ -374,7 +374,7 @@ static void __init test_bitmap_parselist_user(void)
374374
__test_bitmap_parselist(1);
375375
}
376376

377-
#define EXP1_IN_BITS (sizeof(exp) * 8)
377+
#define EXP1_IN_BITS (sizeof(exp1) * 8)
378378

379379
static void __init test_bitmap_arr32(void)
380380
{
@@ -385,9 +385,9 @@ static void __init test_bitmap_arr32(void)
385385
memset(arr, 0xa5, sizeof(arr));
386386

387387
for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) {
388-
bitmap_to_arr32(arr, exp, nbits);
388+
bitmap_to_arr32(arr, exp1, nbits);
389389
bitmap_from_arr32(bmap2, arr, nbits);
390-
expect_eq_bitmap(bmap2, exp, nbits);
390+
expect_eq_bitmap(bmap2, exp1, nbits);
391391

392392
next_bit = find_next_bit(bmap2,
393393
round_up(nbits, BITS_PER_LONG), nbits);

0 commit comments

Comments
 (0)