mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
cpumask: switch for_each_cpu{,_not} to use for_each_bit()
The difference between for_each_cpu() and for_each_set_bit() is that the latter uses cpumask_next() instead of find_next_bit(), and so calls cpumask_check(). This check is useless because the iterator value is not provided by user. It generates false-positives for the very last iteration of for_each_cpu(). Signed-off-by: Yury Norov <yury.norov@gmail.com>
This commit is contained in:
@@ -390,6 +390,11 @@ unsigned long find_next_bit_le(const void *addr, unsigned
|
||||
(bit) < (size); \
|
||||
(bit) = find_next_bit((addr), (size), (bit) + 1))
|
||||
|
||||
#define for_each_and_bit(bit, addr1, addr2, size) \
|
||||
for ((bit) = find_next_and_bit((addr1), (addr2), (size), 0); \
|
||||
(bit) < (size); \
|
||||
(bit) = find_next_and_bit((addr1), (addr2), (size), (bit) + 1))
|
||||
|
||||
/* same as for_each_set_bit() but use bit as value to start with */
|
||||
#define for_each_set_bit_from(bit, addr, size) \
|
||||
for ((bit) = find_next_bit((addr), (size), (bit)); \
|
||||
|
||||
Reference in New Issue
Block a user