Skip to content

lib: rework bitmap_parselist and tests

Yury Norov lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 2 repliesIn review
  2. v45 patches 4 repliesSuperseded
  3. v33 of 5 patches 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 2/26 patches6 repliesSuperseded
v2 posting 1/20 of 5 patches1 replySuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5lib: make bitmap_parselist_user() a wrapper on bitmap_parselist()lib/bitmap.c+11 -81 reply
2/5lib: rework bitmap_parselistlib/bitmap.c+142 -1131 reply
3/5lib/test_bitmap: switch test_bitmap_parselist to ktime_get()lib/test_bitmap.c+4 -50 replies
4/5lib/test_bitmap: add testcases for bitmap_parselistlib/test_bitmap.c+17 -10 replies
5/5lib/test_bitmap: add tests for bitmap_parselist_userlib/test_bitmap.c+36 -100 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchAndy Shevchenko
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [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).

v1: https://lkml.org/lkml/2018/12/23/50
v2: https://www.spinics.net/lists/kernel/msg3048976.html
v3: https://lkml.org/lkml/2019/4/3/68
v4: https://lkml.org/lkml/2019/4/5/640
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(-)
Signature · 1 line
2.17.1