summaryrefslogtreecommitdiffstats
path: root/arch/sparc/lib
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2011-02-08 04:59:49 +0000
committerDavid S. Miller <davem@davemloft.net>2011-02-08 22:52:53 -0800
commite637804c33494e8e7e454dbc625cc4b773f38d6f (patch)
tree6414fa3f87d09abb1c1b1181f8784795671fb5ca /arch/sparc/lib
parent2492218c63dca0fb4f041bdc366d243ae3426b40 (diff)
downloadlinux-e637804c33494e8e7e454dbc625cc4b773f38d6f.tar.bz2
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>
Diffstat (limited to 'arch/sparc/lib')
-rw-r--r--arch/sparc/lib/bitext.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/sparc/lib/bitext.c b/arch/sparc/lib/bitext.c
index 764b3eb7b604..48d00e72ce15 100644
--- a/arch/sparc/lib/bitext.c
+++ b/arch/sparc/lib/bitext.c
@@ -10,7 +10,7 @@
*/
#include <linux/string.h>
-#include <linux/bitops.h>
+#include <linux/bitmap.h>
#include <asm/bitext.h>
@@ -80,8 +80,7 @@ int bit_map_string_get(struct bit_map *t, int len, int align)
while (test_bit(offset + i, t->map) == 0) {
i++;
if (i == len) {
- for (i = 0; i < len; i++)
- __set_bit(offset + i, t->map);
+ bitmap_set(t->map, offset, len);
if (offset == t->first_free)
t->first_free = find_next_zero_bit
(t->map, t->size,