From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
linux-gpio@vger.kernel.org,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Yury Norov <yury.norov@gmail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 04/11] lib/test_bitmap: Rename exp to exp1 to avoid ambiguous name
Date: Tue, 22 Oct 2019 20:29:15 +0300 [thread overview]
Message-ID: <20191022172922.61232-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20191022172922.61232-1-andriy.shevchenko@linux.intel.com>
One function is using exp as local variable.
Avoid ambiguous naming by rename global one to exp1.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
lib/test_bitmap.c | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index 38f923411ada..6b70166ac960 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -247,7 +247,7 @@ struct test_bitmap_parselist{
const int flags;
};
-static const unsigned long exp[] __initconst = {
+static const unsigned long exp1[] __initconst = {
BITMAP_FROM_U64(1),
BITMAP_FROM_U64(2),
BITMAP_FROM_U64(0x0000ffff),
@@ -271,29 +271,29 @@ static const unsigned long exp2[] __initconst = {
static const struct test_bitmap_parselist parselist_tests[] __initconst = {
#define step (sizeof(u64) / sizeof(unsigned long))
- {0, "0", &exp[0], 8, 0},
- {0, "1", &exp[1 * step], 8, 0},
- {0, "0-15", &exp[2 * step], 32, 0},
- {0, "16-31", &exp[3 * step], 32, 0},
- {0, "0-31:1/2", &exp[4 * step], 32, 0},
- {0, "1-31:1/2", &exp[5 * step], 32, 0},
- {0, "0-31:1/4", &exp[6 * step], 32, 0},
- {0, "1-31:1/4", &exp[7 * step], 32, 0},
- {0, "0-31:4/4", &exp[8 * step], 32, 0},
- {0, "1-31:4/4", &exp[9 * step], 32, 0},
- {0, "0-31:1/4,32-63:2/4", &exp[10 * step], 64, 0},
- {0, "0-31:3/4,32-63:4/4", &exp[11 * step], 64, 0},
- {0, " ,, 0-31:3/4 ,, 32-63:4/4 ,, ", &exp[11 * step], 64, 0},
+ {0, "0", &exp1[0], 8, 0},
+ {0, "1", &exp1[1 * step], 8, 0},
+ {0, "0-15", &exp1[2 * step], 32, 0},
+ {0, "16-31", &exp1[3 * step], 32, 0},
+ {0, "0-31:1/2", &exp1[4 * step], 32, 0},
+ {0, "1-31:1/2", &exp1[5 * step], 32, 0},
+ {0, "0-31:1/4", &exp1[6 * step], 32, 0},
+ {0, "1-31:1/4", &exp1[7 * step], 32, 0},
+ {0, "0-31:4/4", &exp1[8 * step], 32, 0},
+ {0, "1-31:4/4", &exp1[9 * step], 32, 0},
+ {0, "0-31:1/4,32-63:2/4", &exp1[10 * step], 64, 0},
+ {0, "0-31:3/4,32-63:4/4", &exp1[11 * step], 64, 0},
+ {0, " ,, 0-31:3/4 ,, 32-63:4/4 ,, ", &exp1[11 * step], 64, 0},
{0, "0-31:1/4,32-63:2/4,64-95:3/4,96-127:4/4", exp2, 128, 0},
{0, "0-2047:128/256", NULL, 2048, PARSE_TIME},
- {0, "", &exp[12 * step], 8, 0},
- {0, "\n", &exp[12 * step], 8, 0},
- {0, ",, ,, , , ,", &exp[12 * step], 8, 0},
- {0, " , ,, , , ", &exp[12 * step], 8, 0},
- {0, " , ,, , , \n", &exp[12 * step], 8, 0},
+ {0, "", &exp1[12 * step], 8, 0},
+ {0, "\n", &exp1[12 * step], 8, 0},
+ {0, ",, ,, , , ,", &exp1[12 * step], 8, 0},
+ {0, " , ,, , , ", &exp1[12 * step], 8, 0},
+ {0, " , ,, , , \n", &exp1[12 * step], 8, 0},
{-EINVAL, "-1", NULL, 8, 0},
{-EINVAL, "-0", NULL, 8, 0},
@@ -374,7 +374,7 @@ static void __init test_bitmap_parselist_user(void)
__test_bitmap_parselist(1);
}
-#define EXP1_IN_BITS (sizeof(exp) * 8)
+#define EXP1_IN_BITS (sizeof(exp1) * 8)
static void __init test_bitmap_arr32(void)
{
@@ -385,9 +385,9 @@ static void __init test_bitmap_arr32(void)
memset(arr, 0xa5, sizeof(arr));
for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) {
- bitmap_to_arr32(arr, exp, nbits);
+ bitmap_to_arr32(arr, exp1, nbits);
bitmap_from_arr32(bmap2, arr, nbits);
- expect_eq_bitmap(bmap2, exp, nbits);
+ expect_eq_bitmap(bmap2, exp1, nbits);
next_bit = find_next_bit(bmap2,
round_up(nbits, BITS_PER_LONG), nbits);
--
2.23.0
next prev parent reply other threads:[~2019-10-22 17:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 17:29 [PATCH v2 00/11] gpio: pca953x: Convert to bitmap (extended) API Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 01/11] lib/test_bitmap: Force argument of bitmap_parselist_user() to proper address space Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 02/11] lib/test_bitmap: Undefine macros after use Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 03/11] lib/test_bitmap: Name EXP_BYTES properly Andy Shevchenko
2019-10-22 17:29 ` Andy Shevchenko [this message]
2019-10-22 17:29 ` [PATCH v2 05/11] lib/test_bitmap: Move exp1 and exp2 upper for others to use Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 06/11] lib/test_bitmap: Fix comment about this file Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 07/11] bitmap: Introduce bitmap_replace() helper Andy Shevchenko
2019-12-26 16:15 ` Guenter Roeck
2020-01-08 18:10 ` Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 08/11] gpio: pca953x: Remove redundant variable and check in IRQ handler Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 09/11] gpio: pca953x: Use input from regs structure in pca953x_irq_pending() Andy Shevchenko
2019-10-22 17:29 ` [PATCH v2 10/11] gpio: pca953x: Convert to use bitmap API Andy Shevchenko
2019-10-22 18:03 ` Geert Uytterhoeven
2019-10-23 8:01 ` Andy Shevchenko
2019-10-23 8:34 ` Geert Uytterhoeven
2019-10-22 17:29 ` [PATCH v2 11/11] gpio: pca953x: Tight up indentation Andy Shevchenko
2019-10-23 14:10 ` [PATCH v2 00/11] gpio: pca953x: Convert to bitmap (extended) API Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191022172922.61232-5-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=vilhelm.gray@gmail.com \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).