diff options
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/ib_addr.h | 10 | ||||
-rw-r--r-- | include/rdma/ib_fmr_pool.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index fcb5ba87dcc5..0ff67398928d 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h | |||
@@ -89,9 +89,10 @@ static inline void ib_addr_set_pkey(struct rdma_dev_addr *dev_addr, u16 pkey) | |||
89 | dev_addr->broadcast[9] = (unsigned char) pkey; | 89 | dev_addr->broadcast[9] = (unsigned char) pkey; |
90 | } | 90 | } |
91 | 91 | ||
92 | static inline union ib_gid *ib_addr_get_sgid(struct rdma_dev_addr *dev_addr) | 92 | static inline void ib_addr_get_sgid(struct rdma_dev_addr *dev_addr, |
93 | union ib_gid *gid) | ||
93 | { | 94 | { |
94 | return (union ib_gid *) (dev_addr->src_dev_addr + 4); | 95 | memcpy(gid, dev_addr->src_dev_addr + 4, sizeof *gid); |
95 | } | 96 | } |
96 | 97 | ||
97 | static inline void ib_addr_set_sgid(struct rdma_dev_addr *dev_addr, | 98 | static inline void ib_addr_set_sgid(struct rdma_dev_addr *dev_addr, |
@@ -100,9 +101,10 @@ static inline void ib_addr_set_sgid(struct rdma_dev_addr *dev_addr, | |||
100 | memcpy(dev_addr->src_dev_addr + 4, gid, sizeof *gid); | 101 | memcpy(dev_addr->src_dev_addr + 4, gid, sizeof *gid); |
101 | } | 102 | } |
102 | 103 | ||
103 | static inline union ib_gid *ib_addr_get_dgid(struct rdma_dev_addr *dev_addr) | 104 | static inline void ib_addr_get_dgid(struct rdma_dev_addr *dev_addr, |
105 | union ib_gid *gid) | ||
104 | { | 106 | { |
105 | return (union ib_gid *) (dev_addr->dst_dev_addr + 4); | 107 | memcpy(gid, dev_addr->dst_dev_addr + 4, sizeof *gid); |
106 | } | 108 | } |
107 | 109 | ||
108 | static inline void ib_addr_set_dgid(struct rdma_dev_addr *dev_addr, | 110 | static inline void ib_addr_set_dgid(struct rdma_dev_addr *dev_addr, |
diff --git a/include/rdma/ib_fmr_pool.h b/include/rdma/ib_fmr_pool.h index 4ace54cd0cce..00dadbf94e1d 100644 --- a/include/rdma/ib_fmr_pool.h +++ b/include/rdma/ib_fmr_pool.h | |||
@@ -88,7 +88,7 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool); | |||
88 | struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle, | 88 | struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle, |
89 | u64 *page_list, | 89 | u64 *page_list, |
90 | int list_len, | 90 | int list_len, |
91 | u64 *io_virtual_address); | 91 | u64 io_virtual_address); |
92 | 92 | ||
93 | int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr); | 93 | int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr); |
94 | 94 | ||