diff options
-rw-r--r-- | drivers/infiniband/core/umem.c | 5 | ||||
-rw-r--r-- | include/rdma/ib_verbs.h | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 26d0470eef6e..664d2faa9e74 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c | |||
@@ -40,6 +40,11 @@ | |||
40 | 40 | ||
41 | #include "uverbs.h" | 41 | #include "uverbs.h" |
42 | 42 | ||
43 | #define IB_UMEM_MAX_PAGE_CHUNK \ | ||
44 | ((PAGE_SIZE - offsetof(struct ib_umem_chunk, page_list)) / \ | ||
45 | ((void *) &((struct ib_umem_chunk *) 0)->page_list[1] - \ | ||
46 | (void *) &((struct ib_umem_chunk *) 0)->page_list[0])) | ||
47 | |||
43 | static void __ib_umem_release(struct ib_device *dev, struct ib_umem *umem, int dirty) | 48 | static void __ib_umem_release(struct ib_device *dev, struct ib_umem *umem, int dirty) |
44 | { | 49 | { |
45 | struct ib_umem_chunk *chunk, *tmp; | 50 | struct ib_umem_chunk *chunk, *tmp; |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 7a99f1125d24..4bea182d7116 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -733,11 +733,6 @@ struct ib_udata { | |||
733 | size_t outlen; | 733 | size_t outlen; |
734 | }; | 734 | }; |
735 | 735 | ||
736 | #define IB_UMEM_MAX_PAGE_CHUNK \ | ||
737 | ((PAGE_SIZE - offsetof(struct ib_umem_chunk, page_list)) / \ | ||
738 | ((void *) &((struct ib_umem_chunk *) 0)->page_list[1] - \ | ||
739 | (void *) &((struct ib_umem_chunk *) 0)->page_list[0])) | ||
740 | |||
741 | struct ib_pd { | 736 | struct ib_pd { |
742 | struct ib_device *device; | 737 | struct ib_device *device; |
743 | struct ib_uobject *uobject; | 738 | struct ib_uobject *uobject; |