The patch titled Subject: lib: bitmap_parselist: don't calculate length of the input string has been removed from the -mm tree. Its filename was bitmap_parselist-dont-calculate-length-of-the-input-string.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Yury Norov <ynorov@xxxxxxxxxxx> Subject: lib: bitmap_parselist: don't calculate length of the input string Patch series "lib: rework bitmap_parselist and tests", v2. 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 This patch (of 6): bitmap_parselist() calculates length of the input string before passing it to the __bitmap_parselist(). But the end-of-line condition is checked for every character in __bitmap_parselist() anyway. So doing it in wrapper is a simple waste of time. Link: http://lkml.kernel.org/r/20190325210748.6571-2-ynorov@xxxxxxxxxxx Signed-off-by: Yury Norov <ynorov@xxxxxxxxxxx> Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/bitmap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/lib/bitmap.c~bitmap_parselist-dont-calculate-length-of-the-input-string +++ a/lib/bitmap.c @@ -614,10 +614,7 @@ static int __bitmap_parselist(const char int bitmap_parselist(const char *bp, unsigned long *maskp, int nmaskbits) { - char *nl = strchrnul(bp, '\n'); - int len = nl - bp; - - return __bitmap_parselist(bp, len, 0, maskp, nmaskbits); + return __bitmap_parselist(bp, UINT_MAX, 0, maskp, nmaskbits); } EXPORT_SYMBOL(bitmap_parselist); _ Patches currently in -mm which might be from ynorov@xxxxxxxxxxx are bitmap_parselist-move-non-parser-logic-to-helpers.patch bitmap_parselist-rework-input-string-parser.patch lib-test_bitmap-switch-test_bitmap_parselist-to-ktime_get.patch lib-test_bitmap-add-testcases-for-bitmap_parselist.patch lib-test_bitmap-add-tests-for-bitmap_parselist_user.patch