aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-02-12 18:02:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-12 21:54:14 -0500
commitb26ad5836c3a0a9d456eb60b9f841ca15403ee59 (patch)
tree74b4b59d18c350bb79481283c8b54440c1aa25c7 /lib
parenteb5698837881687841c9e477e4162ac3387c6b59 (diff)
lib/bitmap.c: change parameters of bitmap_fold to unsigned
Change the sz and nbits parameters of bitmap_fold to unsigned int for consistency with other bitmap_* functions, and to save another few bytes in the generated code. [akpm@linux-foundation.org: fix kerneldoc] Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bitmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c
index ee598a496895..b0d3e823dab3 100644
--- a/lib/bitmap.c
+++ b/lib/bitmap.c
@@ -1039,22 +1039,22 @@ EXPORT_SYMBOL(bitmap_onto);
1039 * @dst: resulting smaller bitmap 1039 * @dst: resulting smaller bitmap
1040 * @orig: original larger bitmap 1040 * @orig: original larger bitmap
1041 * @sz: specified size 1041 * @sz: specified size
1042 * @bits: number of bits in each of these bitmaps 1042 * @nbits: number of bits in each of these bitmaps
1043 * 1043 *
1044 * For each bit oldbit in @orig, set bit oldbit mod @sz in @dst. 1044 * For each bit oldbit in @orig, set bit oldbit mod @sz in @dst.
1045 * Clear all other bits in @dst. See further the comment and 1045 * Clear all other bits in @dst. See further the comment and
1046 * Example [2] for bitmap_onto() for why and how to use this. 1046 * Example [2] for bitmap_onto() for why and how to use this.
1047 */ 1047 */
1048void bitmap_fold(unsigned long *dst, const unsigned long *orig, 1048void bitmap_fold(unsigned long *dst, const unsigned long *orig,
1049 int sz, int bits) 1049 unsigned int sz, unsigned int nbits)
1050{ 1050{
1051 int oldbit; 1051 unsigned int oldbit;
1052 1052
1053 if (dst == orig) /* following doesn't handle inplace mappings */ 1053 if (dst == orig) /* following doesn't handle inplace mappings */
1054 return; 1054 return;
1055 bitmap_zero(dst, bits); 1055 bitmap_zero(dst, nbits);
1056 1056
1057 for_each_set_bit(oldbit, orig, bits) 1057 for_each_set_bit(oldbit, orig, nbits)
1058 set_bit(oldbit % sz, dst); 1058 set_bit(oldbit % sz, dst);
1059} 1059}
1060EXPORT_SYMBOL(bitmap_fold); 1060EXPORT_SYMBOL(bitmap_fold);