diff mbox

sparc: use bitmap_set()

Message ID 1297177190-1423-1-git-send-email-akinobu.mita@gmail.com
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Akinobu Mita Feb. 8, 2011, 2:59 p.m. UTC
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
---
 arch/sparc/lib/bitext.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Comments

David Miller Feb. 9, 2011, 6:53 a.m. UTC | #1
From: Akinobu Mita <akinobu.mita@gmail.com>
Date: Tue,  8 Feb 2011 23:59:49 +0900

> Use bitmap_set() instead of calling __set_bit() each bit.
> 
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/sparc/lib/bitext.c b/arch/sparc/lib/bitext.c
index 764b3eb..48d00e7 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,