@@ -42,7 +42,7 @@
#include <util/util.h>
#include <infiniband/verbs.h>
#include <ccan/array_size.h>
-#include <ccan/bitmap.h>
+#include <util/bitmap.h>
#include <ccan/container_of.h>
#include <linux/if_ether.h>
#include "hns_roce_u_abi.h"
@@ -193,7 +193,7 @@ struct hns_roce_db_page {
struct hns_roce_buf buf;
unsigned int num_db;
unsigned int use_cnt;
- bitmap *bitmap;
+ unsigned long *bitmap;
};
struct hns_roce_context {
@@ -33,7 +33,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <ccan/bitmap.h>
+#include <util/bitmap.h>
#include "hns_roce_u.h"
#include "hns_roce_u_db.h"
@@ -109,7 +109,7 @@ void *hns_roce_alloc_db(struct hns_roce_context *ctx,
found:
++page->use_cnt;
- npos = bitmap_ffs(page->bitmap, 0, page->num_db);
+ npos = bitmap_find_first_bit(page->bitmap, 0, page->num_db);
bitmap_clear_bit(page->bitmap, npos);
db = page->buf.buf + npos * db_size[type];