]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4: use bitmap library
authorAkinobu Mita <akinobu.mita@gmail.com>
Fri, 27 Aug 2010 19:08:13 +0000 (19:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Aug 2010 22:37:04 +0000 (15:37 -0700)
commitadd7db3f6142c4a9400ba038dd4912334c8d16a3
tree7a1ddef5bf95ea0892c9aa7bf9462b52506b6ef5
parentc1a15ff4dc91bf36ddc0c02b4093bc7cd0cf00dd
mlx4: use bitmap library

Replace loops calling set_bit() and clear_bit() with bitmap_set() and
bitmap_clear().

Unlike loops calling set_bit() and clear_bit(), bitmap_set() and
bitmap_clear() are not atomic. But this is ok.
Because the bitmap operations are protected by bitmap->lock
except for initialization of the bitmap in mlx4_bitmap_init().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mlx4/alloc.c