mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 07:39:47 +00:00
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>
This commit is contained in:
parent
2492218c63
commit
e637804c33
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user