Skip to content

Commit

Permalink
sparc: use bitmap_set()
Browse files Browse the repository at this point in the history
Use bitmap_set() instead of calling __set_bit() each bit.

Signed-off-by: Akinobu Mita <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
mita authored and davem330 committed Feb 9, 2011
1 parent 2492218 commit e637804
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/sparc/lib/bitext.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

#include <linux/string.h>
#include <linux/bitops.h>
#include <linux/bitmap.h>

#include <asm/bitext.h>

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e637804

Please sign in to comment.