[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190325210748.6571-1-ynorov@marvell.com>
Date: Tue, 26 Mar 2019 00:07:42 +0300
From: Yury Norov <yury.norov@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Arnd Bergmann <arnd@...db.de>,
Kees Cook <keescook@...omium.org>,
Matthew Wilcox <willy@...radead.org>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc: Yury Norov <ynorov@...vell.com>, Yury Norov <yury.norov@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 RESEND 0/6] 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 than they may be because bitmap_parselist()
is a part of user interface, and its behavior should not change.
In this patchset
- __bitmap_parselist() is reworked (patches 2 and 3);
- time measurement in test_bitmap_parselist switched to ktime_get
(patch 4);
- new tests introduced (patch 5), and
- bitmap_parselist_user() testing enabled with the same testset as
bitmap_parselist() (patch 6).
Patches 1 and 4 are fixes and may be applied separately.
v1: https://lkml.org/lkml/2018/12/23/50
v2: https://www.spinics.net/lists/kernel/msg3048976.html
v2 RESEND: rebased on next-20190325 and retested.
Yury Norov (6):
bitmap_parselist: don't calculate length of the input string
bitmap_parselist: move non-parser logic to helpers
bitmap_parselist: rework input string parser
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 | 294 ++++++++++++++++++++++++++++++----------------
lib/test_bitmap.c | 67 +++++++++--
2 files changed, 245 insertions(+), 116 deletions(-)
--
2.17.1
Powered by blists - more mailing lists