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. Change-Id: I0aebd4398745f9ba7d245cc2149052ce4eaf7bb4 Signed-off-by:Anshul Garg <aksgarg1989@gmail.com> Signed-off-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Git-commit: 3e2b03dad54bbcab5be948629a644d55ce7b5a2e Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by:
Matt Wagantall <mattw@codeaurora.org>
Loading
Please register or sign in to comment