Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc: use bitmap_set()

Use bitmap_set() instead of calling __set_bit() each bit.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Akinobu Mita and committed by
David S. Miller
e637804c 2492218c

+2 -3
+2 -3
arch/sparc/lib/bitext.c
··· 10 10 */ 11 11 12 12 #include <linux/string.h> 13 - #include <linux/bitops.h> 13 + #include <linux/bitmap.h> 14 14 15 15 #include <asm/bitext.h> 16 16 ··· 80 80 while (test_bit(offset + i, t->map) == 0) { 81 81 i++; 82 82 if (i == len) { 83 - for (i = 0; i < len; i++) 84 - __set_bit(offset + i, t->map); 83 + bitmap_set(t->map, offset, len); 85 84 if (offset == t->first_free) 86 85 t->first_free = find_next_zero_bit 87 86 (t->map, t->size,