lib/find: optimize for_each() macros
authorYury Norov <yury.norov@gmail.com>
Mon, 19 Sep 2022 21:05:58 +0000 (14:05 -0700)
committerYury Norov <yury.norov@gmail.com>
Sat, 1 Oct 2022 17:22:58 +0000 (10:22 -0700)
commitfdae96a3fc7f70eb8ff9619550d7fa604719626a
tree98dc830d9a0fde79da8df36e5e141d661e431a6b
parent4fe49b3b97c2640147c46519c2a6fdb06df34f5f
lib/find: optimize for_each() macros

Moving an iterator of the macros inside conditional part of for-loop
helps to generate a better code. It had been first implemented in commit
7baac8b91f9871ba ("cpumask: make for_each_cpu_mask a bit smaller").

Now that cpumask for-loops are the aliases to bitmap loops, it's worth
to optimize them the same way.

Bloat-o-meter says:
add/remove: 8/12 grow/shrink: 147/592 up/down: 4876/-24416 (-19540)

Signed-off-by: Yury Norov <yury.norov@gmail.com>
include/linux/find.h