Rasmus Villemoes dba94c2553 lib: bitmap: change bitmap_shift_left to take unsigned parameters
gcc can generate slightly better code for stuff like "nbits %
BITS_PER_LONG" when it knows nbits is not negative.  Since negative size
bitmaps or shift amounts don't make sense, change these parameters of
bitmap_shift_right to unsigned.

If off >= lim (which requires shift >= nbits), k is initialized with a
large positive value, but since I've let k continue to be signed, the loop
will never run and dst will be zeroed as expected.  Inside the loop, k is
guaranteed to be non-negative, so the fact that it is promoted to unsigned
in the various expressions it appears in is harmless.

Also use "shift" and "nbits" consistently for the parameter names.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-13 21:21:35 -08:00
..
2014-09-22 16:48:47 +09:00
2014-12-14 14:57:16 -08:00
2014-12-02 16:20:59 -08:00
2014-11-24 17:24:08 -05:00
2014-12-15 18:19:03 -08:00
2015-02-11 10:56:48 -08:00
2015-02-11 10:28:45 -08:00
2015-01-29 10:49:28 +02:00
2014-12-14 14:57:16 -08:00
2014-12-18 19:08:10 -08:00
2015-02-12 18:54:15 -08:00
2014-12-14 16:10:09 -08:00
2014-12-19 22:55:06 +01:00
2014-12-14 16:10:09 -08:00
2015-01-21 19:21:30 +01:00
2014-11-10 09:27:30 -07:00
2015-02-11 18:03:54 -08:00
2014-12-31 13:06:50 -05:00
2014-10-09 11:35:48 +03:00
2014-10-08 16:01:41 -04:00
2015-02-12 18:54:28 -08:00
2015-01-27 11:09:13 +01:00
2014-09-29 15:37:01 -04:00
2014-12-16 14:53:01 -08:00
2015-01-15 10:34:54 +01:00
2015-01-15 10:34:54 +01:00
2015-01-24 10:11:12 +01:00
2014-12-18 09:39:51 +01:00
2015-01-04 23:11:43 -05:00
2014-10-09 22:25:58 -04:00
2015-02-11 17:06:02 -08:00
2014-10-24 00:14:36 +02:00
2014-11-04 13:29:38 +00:00
2014-12-11 13:06:58 -08:00
2014-12-14 14:57:16 -08:00
2015-02-11 18:15:38 -08:00
2015-01-06 11:01:13 -08:00
2015-01-22 15:10:56 +01:00
2015-01-03 14:32:57 -05:00
2015-02-12 18:54:14 -08:00
2014-11-06 14:57:27 -08:00
2014-09-23 21:40:48 -07:00
2014-11-28 16:08:16 +01:00
2014-09-16 15:02:55 -06:00
2014-12-09 12:05:24 +02:00
2014-12-15 23:49:28 +02:00