public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] bitmap: cleanup bitmap_*_region() implementation
@ 2023-08-11  0:57 Yury Norov
  2023-08-11  0:57 ` [PATCH v2 1/6] bitmap: fix opencoded bitmap_allocate_region() Yury Norov
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Yury Norov @ 2023-08-11  0:57 UTC (permalink / raw)
  To: linux-kernel, Andy Shevchenko, Rasmus Villemoes; +Cc: Yury Norov

bitmap_{allocate,find_free,release}_region() functions are implemented
on top of _reg_op() machinery. It duplicates existing generic functionality
with no benefits. In fact, generic alternatives may work even better
because they optimized for small_const_nbits() case and overall very well
optimized for performance and code generation.

This series drops _reg_op() entirely.

v2:
 - fix declaration order (patch6);
 - fix kernel-doc varnings;
 - don't use 'drop' wording where (patches 2-4);

Yury Norov (6):
  bitmap: fix opencoded bitmap_allocate_region()
  bitmap: replace _reg_op(REG_OP_ALLOC) with bitmap_set()
  bitmap: replace _reg_op(REG_OP_RELEASE) with bitmap_clear()
  bitmap: replace _reg_op(REG_OP_ISFREE) with find_next_bit()
  bitmap: drop _reg_op() function
  bitmap: move bitmap_*_region functions to bitmap.h

 include/linux/bitmap.h |  65 ++++++++++++++++++-
 lib/bitmap.c           | 140 -----------------------------------------
 2 files changed, 62 insertions(+), 143 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2023-08-14  0:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11  0:57 [PATCH v2 0/6] bitmap: cleanup bitmap_*_region() implementation Yury Norov
2023-08-11  0:57 ` [PATCH v2 1/6] bitmap: fix opencoded bitmap_allocate_region() Yury Norov
2023-08-11  0:57 ` [PATCH v2 2/6] bitmap: replace _reg_op(REG_OP_ALLOC) with bitmap_set() Yury Norov
2023-08-11  6:21   ` Rasmus Villemoes
2023-08-11 12:56     ` Yury Norov
2023-08-11 13:31       ` Rasmus Villemoes
2023-08-14  0:39         ` Yury Norov
2023-08-11  9:25   ` Andy Shevchenko
2023-08-11 13:01     ` Yury Norov
2023-08-11  0:57 ` [PATCH v2 3/6] bitmap: replace _reg_op(REG_OP_RELEASE) with bitmap_clear() Yury Norov
2023-08-11  0:57 ` [PATCH v2 4/6] bitmap: replace _reg_op(REG_OP_ISFREE) with find_next_bit() Yury Norov
2023-08-11  0:57 ` [PATCH v2 5/6] bitmap: drop _reg_op() function Yury Norov
2023-08-11  0:57 ` [PATCH v2 6/6] bitmap: move bitmap_*_region functions to bitmap.h Yury Norov
2023-08-11  9:27   ` Andy Shevchenko
2023-08-11 13:05     ` Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox