diff options
| author | Jonathan Corbet <corbet@lwn.net> | 2016-12-27 12:53:44 -0700 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2016-12-27 12:53:44 -0700 |
| commit | 54ab6db0909061ab7ee07233d3cab86d29f86e6c (patch) | |
| tree | a7650ab5c0fa3a6a3841de8e8693041b3e009054 /tools/include/linux/bitops.h | |
| parent | 217e2bfab22e740227df09f22165e834cddd8a3b (diff) | |
| parent | 7ce7d89f48834cefece7804d38fc5d85382edf77 (diff) | |
Merge tag 'v4.10-rc1' into docs-next
Linux 4.10-rc1
Diffstat (limited to 'tools/include/linux/bitops.h')
| -rw-r--r-- | tools/include/linux/bitops.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/include/linux/bitops.h b/tools/include/linux/bitops.h index 49c929a104ee..fc446343ff41 100644 --- a/tools/include/linux/bitops.h +++ b/tools/include/linux/bitops.h @@ -39,6 +39,11 @@ extern unsigned long __sw_hweight64(__u64 w); (bit) < (size); \ (bit) = find_next_bit((addr), (size), (bit) + 1)) +#define for_each_clear_bit(bit, addr, size) \ + for ((bit) = find_first_zero_bit((addr), (size)); \ + (bit) < (size); \ + (bit) = find_next_zero_bit((addr), (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)); \ |
