lkml.org 
[lkml]   [2022]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/16] lib/test_bitmap: don't test bitmap_set if nbits == 0
Date
Don't test bitmap_set(bitmap, start, 0) as it's useless, most probably
a sign of error in real code, and makes CONFIG_DEBUG_BITMAP barking.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
---
lib/test_bitmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index 98754ff9fe68..2a70393ac011 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -622,7 +622,7 @@ static void noinline __init test_mem_optimisations(void)
unsigned int start, nbits;

for (start = 0; start < 1024; start += 8) {
- for (nbits = 0; nbits < 1024 - start; nbits += 8) {
+ for (nbits = 1; nbits < 1024 - start; nbits += 8) {
memset(bmap1, 0x5a, sizeof(bmap1));
memset(bmap2, 0x5a, sizeof(bmap2));

--
2.34.1
\
 
 \ /
  Last update: 2022-07-18 21:30    [W:0.191 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site