Skip to contentSkip to conversation

sparc: use bitmap_set()

PATCH Applied Akinobu Mita 2 participants 2 messages Feb 8, 2011 – Feb 9, 2011 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc: use bitmap_set()

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

---
 arch/sparc/lib/bitext.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
arch/sparc/lib/bitext.c +2 -3
index 764b3eb..48d00e7 100644
@@ -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,
Signature · 1 line
1.7.4