-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <aksgarg1989@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
- Loading branch information
Anshul Garg
authored and
Dmitry Torokhov
committed
Jun 25, 2015
1 parent
3e30c11
commit 3e2b03d
Showing
1 changed file
with
9 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters