diff options
author | Anshul Garg <[email protected]> | 2015-06-25 13:33:12 -0700 |
---|---|---|
committer | Dmitry Torokhov <[email protected]> | 2015-06-25 14:44:36 -0700 |
commit | 3e2b03dad54bbcab5be948629a644d55ce7b5a2e (patch) | |
tree | d9f561ab35d2835dfab9af4f37360762f74310e0 /lib/memory-notifier-error-inject.c | |
parent | 3e30c11c8a902de350281a0d821e17cdb45ef156 (diff) |
Input: use for_each_set_bit() where appropriate
Instead of iterating over all bits in a bitmap and test them individually
let's siwtch to for_each_set_bit() which is more compact and is also
faster.
Also use bitmap_weight() when counting number of set bits.
This also fixes INPUT_DO_TOGGLE() implementation as it should have used
*_CNT as the upper boundary, not *_MAX.
Signed-off-by: Anshul Garg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions