Commit 92ddc447ce7382e36b72a240697c00bf4beb8d75

Authored by Dotan Barak
Committed by Roland Dreier
1 parent bfb3ea1251

IB: Move the macro IB_UMEM_MAX_PAGE_CHUNK() to umem.c

After moving the definition of struct ib_umem_chunk from ib_verbs.h to
ib_umem.h there isn't any reason for the macro IB_UMEM_MAX_PAGE_CHUNK
to stay in ib_verbs.h.  Move the macro to umem.c, the only place where
it is used.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

Showing 2 changed files with 5 additions and 5 deletions Side-by-side Diff

drivers/infiniband/core/umem.c
... ... @@ -40,6 +40,11 @@
40 40  
41 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 48 static void __ib_umem_release(struct ib_device *dev, struct ib_umem *umem, int dirty)
44 49 {
45 50 struct ib_umem_chunk *chunk, *tmp;
include/rdma/ib_verbs.h
... ... @@ -733,11 +733,6 @@
733 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 736 struct ib_pd {
742 737 struct ib_device *device;
743 738 struct ib_uobject *uobject;