Skip to content

Commit

Permalink
IB: Move the macro IB_UMEM_MAX_PAGE_CHUNK() to umem.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dotan Barak authored and Roland Dreier committed Aug 3, 2007
1 parent bfb3ea1 commit 92ddc44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions drivers/infiniband/core/umem.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@

#include "uverbs.h"

#define IB_UMEM_MAX_PAGE_CHUNK \
((PAGE_SIZE - offsetof(struct ib_umem_chunk, page_list)) / \
((void *) &((struct ib_umem_chunk *) 0)->page_list[1] - \
(void *) &((struct ib_umem_chunk *) 0)->page_list[0]))

static void __ib_umem_release(struct ib_device *dev, struct ib_umem *umem, int dirty)
{
struct ib_umem_chunk *chunk, *tmp;
Expand Down
5 changes: 0 additions & 5 deletions include/rdma/ib_verbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -733,11 +733,6 @@ struct ib_udata {
size_t outlen;
};

#define IB_UMEM_MAX_PAGE_CHUNK \
((PAGE_SIZE - offsetof(struct ib_umem_chunk, page_list)) / \
((void *) &((struct ib_umem_chunk *) 0)->page_list[1] - \
(void *) &((struct ib_umem_chunk *) 0)->page_list[0]))

struct ib_pd {
struct ib_device *device;
struct ib_uobject *uobject;
Expand Down

0 comments on commit 92ddc44

Please sign in to comment.