Skip to content

for_each_*_bit: move to find.h and reconsider

Yury Norov dri-devel linux-hwmon lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3include/linux: move for_each_bit() macros from bitops.h to find.hinclude/linux/bitops.h include/linux/find.h+34 -341 reply
2/3find: micro-optimize for_each_{set,clear}_bit()include/linux/find.h+2 -24 replies
3/3Replace for_each_*_bit_from() with for_each_*_bit() where appropriatearch/x86/kernel/apic/vector.c drivers/gpu/drm/etnaviv/etnaviv_gpu.c drivers/hwmon/ltc2992.c+5 -64 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

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

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

Read the v1 thread

Cover letter [PATCH 0/3] for_each_*_bit: move to find.h and reconsider

for_each_bit() macro family uses find_bit() functions, so it's better to have for_each_bit() and find_bit() functions in the same header.

This series puts for_each_bit() to a proper place and optimizes its usage over the kernel.

The series is based on this:
https://lore.kernel.org/linux-arch/[email protected]/

The full series can be found here:
https://github.com/norov/linux/commits/bm-final

Yury Norov (3):
include/linux: move for_each_bit() macros from bitops.h to find.h
find: micro-optimize for_each_{set,clear}_bit()
Replace for_each_*_bit_from() with for_each_*_bit() where appropriate

 arch/x86/kernel/apic/vector.c         |  4 ++--
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c |  4 ++--
 drivers/hwmon/ltc2992.c               |  3 +--
 include/linux/bitops.h                | 34 ---------------------------
 include/linux/find.h                  | 34 +++++++++++++++++++++++++++
 5 files changed, 39 insertions(+), 40 deletions(-)
Signature · 1 line
2.30.2