]> git.baikalelectronics.ru Git - kernel.git/commit
lib/bitmap.c: correct a code style and do some, optimization
authorPan Xinhui <xinhuix.pan@intel.com>
Wed, 9 Sep 2015 22:37:02 +0000 (15:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 10 Sep 2015 20:29:01 +0000 (13:29 -0700)
commit223575177aaa8a533124e6ef2dc1ee2013f15e29
treea31217219c5bfa59b21ad811984a9482da937e1b
parenta75bb29c11c37ba09159095275ad419746cfcc88
lib/bitmap.c: correct a code style and do some, optimization

We can avoid in-loop incrementation of ndigits.  Save current totaldigits
to ndigits before loop, and check ndigits against totaldigits after the
loop.

Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com>
Cc: Yury Norov <yury.norov@gmail.com>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/bitmap.c