[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v5 0/5] lib: rework bitmap_parselist and tests
bitmap_parselist has been evolved from a pretty simple idea for long and
now lacks for refactoring. It is not structured, has nested loops and a
set of opaque-named variables.

Things are more complicated because bitmap_parselist() is a part of user
interface, and its behavior should not change.

In this patchset
- bitmap_parselist_user() made a wrapper on bitmap_parselist();
- bitmap_parselist() reworked (patch 2);
- time measurement in test_bitmap_parselist switched to ktime_get
(patch 3);
- new tests introduced (patch 4), and
- bitmap_parselist_user() testing enabled with the same testset as
bitmap_parselist() (patch 5).

v5: - fix sadly missed '* step' in patch 4, as spotted by Guenter Roeck;
- use _parse_integer() in bitmap_getnum() to avoid opencoding
mentioned by Andy Shevchenko.

Yury Norov (5):
lib: make bitmap_parselist_user() a wrapper on bitmap_parselist()
lib: rework bitmap_parselist
lib/test_bitmap: switch test_bitmap_parselist to ktime_get()
lib/test_bitmap: add testcases for bitmap_parselist
lib/test_bitmap: add tests for bitmap_parselist_user

lib/bitmap.c | 274 ++++++++++++++++++++++++++--------------------
lib/test_bitmap.c | 67 +++++++++---
2 files changed, 207 insertions(+), 134 deletions(-)


 \ /
  Last update: 2019-04-16 08:38    [W:0.071 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site