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 04/16] lib/test_bitmap: test test_bitmap_arr{32,64} starting from nbits == 1
    Date
    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@gmail.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
    \
     
     \ /
      Last update: 2022-07-18 21:30    [W:3.576 / U:1.284 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site