linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] lib: rework bitmap_parselist and tests
@ 2019-04-05 17:32 Yury Norov
  2019-04-05 17:32 ` [PATCH 1/5] lib: make bitmap_parselist_user() a wrapper on bitmap_parselist() Yury Norov
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Yury Norov @ 2019-04-05 17:32 UTC (permalink / raw)
  To: Andrew Morton, Andy Shevchenko, Rasmus Villemoes, Arnd Bergmann,
	Kees Cook, Matthew Wilcox, Tetsuo Handa, Mike Travis
  Cc: Yury Norov, Yury Norov, linux-kernel

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: - use handy memdup_user_nul() instead of copy_from_user() in patch 1;
    - comments indentation fixed.


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      | 277 ++++++++++++++++++++++++++--------------------
 lib/test_bitmap.c |  67 ++++++++---
 2 files changed, 210 insertions(+), 134 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH v5 0/5] lib: rework bitmap_parselist and tests
@ 2019-04-16  6:37 Yury Norov
  2019-04-16  6:38 ` [PATCH 5/5] lib/test_bitmap: add tests for bitmap_parselist_user Yury Norov
  0 siblings, 1 reply; 11+ messages in thread
From: Yury Norov @ 2019-04-16  6:37 UTC (permalink / raw)
  To: Andrew Morton, Andy Shevchenko, Rasmus Villemoes, Arnd Bergmann,
	Kees Cook, Matthew Wilcox, Tetsuo Handa, Mike Travis,
	Guenter Roeck
  Cc: Yury Norov, Yury Norov, linux-kernel

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(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-04-16  6:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-05 17:32 [PATCH v4 0/5] lib: rework bitmap_parselist and tests Yury Norov
2019-04-05 17:32 ` [PATCH 1/5] lib: make bitmap_parselist_user() a wrapper on bitmap_parselist() Yury Norov
2019-04-08  9:30   ` Andy Shevchenko
2019-04-05 17:32 ` [PATCH 2/5] lib: rework bitmap_parselist Yury Norov
2019-04-08  9:55   ` Andy Shevchenko
2019-04-05 17:32 ` [PATCH 3/5] lib/test_bitmap: switch test_bitmap_parselist to ktime_get() Yury Norov
2019-04-05 17:32 ` [PATCH 4/5] lib/test_bitmap: add testcases for bitmap_parselist Yury Norov
2019-04-11 18:39   ` Guenter Roeck
2019-04-12  8:40     ` Andy Shevchenko
2019-04-05 17:32 ` [PATCH 5/5] lib/test_bitmap: add tests for bitmap_parselist_user Yury Norov
2019-04-16  6:37 [PATCH v5 0/5] lib: rework bitmap_parselist and tests Yury Norov
2019-04-16  6:38 ` [PATCH 5/5] lib/test_bitmap: add tests for bitmap_parselist_user Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).