[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220718192844.1805158-5-yury.norov@gmail.com>
Date: Mon, 18 Jul 2022 12:28:32 -0700
From: Yury Norov <yury.norov@...il.com>
To: linux-kernel@...r.kernel.org,
Alexander Lobakin <alexandr.lobakin@...el.com>,
Alexei Starovoitov <ast@...nel.org>,
Alexey Klimov <aklimov@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrii Nakryiko <andrii@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Ben Segall <bsegall@...gle.com>,
Christoph Lameter <cl@...ux.com>,
Dan Williams <dan.j.williams@...el.com>,
Daniel Borkmann <daniel@...earbox.net>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Dennis Zhou <dennis@...nel.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Eric Dumazet <edumazet@...gle.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Guenter Roeck <linux@...ck-us.net>,
Ingo Molnar <mingo@...hat.com>,
Isabella Basso <isabbasso@...eup.net>,
John Fastabend <john.fastabend@...il.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Juergen Gross <jgross@...e.com>,
Juri Lelli <juri.lelli@...hat.com>,
KP Singh <kpsingh@...nel.org>,
Kees Cook <keescook@...omium.org>,
Martin KaFai Lau <kafai@...com>,
Mel Gorman <mgorman@...e.de>, Miroslav Benes <mbenes@...e.cz>,
Nathan Chancellor <nathan@...nel.org>,
"Paul E . McKenney" <paulmck@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Randy Dunlap <rdunlap@...radead.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Song Liu <songliubraving@...com>,
Steven Rostedt <rostedt@...dmis.org>,
Tejun Heo <tj@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Valentin Schneider <vschneid@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Vlastimil Babka <vbabka@...e.cz>, Yonghong Song <yhs@...com>,
Yury Norov <yury.norov@...il.com>, linux-mm@...ck.org,
netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: [PATCH 04/16] lib/test_bitmap: test test_bitmap_arr{32,64} starting from nbits == 1
nbits == 0 is useless. In a real code it's most probably a sign of
error, and it makes CONFIG_DEBUG_BITMAP barking.
Signed-off-by: Yury Norov <yury.norov@...il.com>
---
lib/test_bitmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index 2a70393ac011..bc48d992d10d 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -567,7 +567,7 @@ static void __init test_bitmap_arr32(void)
memset(arr, 0xa5, sizeof(arr));
- for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) {
+ for (nbits = 1; nbits < EXP1_IN_BITS; ++nbits) {
bitmap_to_arr32(arr, exp1, nbits);
bitmap_from_arr32(bmap2, arr, nbits);
expect_eq_bitmap(bmap2, exp1, nbits);
@@ -593,7 +593,7 @@ static void __init test_bitmap_arr64(void)
memset(arr, 0xa5, sizeof(arr));
- for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) {
+ for (nbits = 1; nbits < EXP1_IN_BITS; ++nbits) {
memset(bmap2, 0xff, sizeof(arr));
bitmap_to_arr64(arr, exp1, nbits);
bitmap_from_arr64(bmap2, arr, nbits);
--
2.34.1
Powered by blists - more mailing lists