• Akinobu Mita's avatar
    mlx4: use bitmap library · e27cd4f8
    Akinobu Mita authored
    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: default avatarAkinobu 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: default avatarDavid S. Miller <davem@davemloft.net>
    e27cd4f8
alloc.c 9.51 KB