]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
sparc: use bitmap_set()
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 8 Feb 2011 04:59:49 +0000 (04:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Feb 2011 06:52:53 +0000 (22:52 -0800)
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>
arch/sparc/lib/bitext.c

index 764b3eb7b604ebd7858d1ed02a4609a31f30537b..48d00e72ce15ba41304f8390ab29324402f052b2 100644 (file)
@@ -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,