From 69324c2015e9ba852f1d66a8150d1a871cc62922 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 20 Jan 2017 13:04:09 -0800 Subject: RDS: IB: Remove an unused structure member Signed-off-by: Bart Van Assche Acked-by: Santosh Shilimkar Cc: David S. Miller Cc: linux-rdma@vger.kernel.org Cc: netdev@vger.kernel.org Cc: rds-devel@oss.oracle.com Signed-off-by: Doug Ledford --- net/rds/ib_mr.h | 1 - 1 file changed, 1 deletion(-) (limited to 'net') diff --git a/net/rds/ib_mr.h b/net/rds/ib_mr.h index 1c754f4acbe5..24c086db4511 100644 --- a/net/rds/ib_mr.h +++ b/net/rds/ib_mr.h @@ -45,7 +45,6 @@ struct rds_ib_fmr { struct ib_fmr *fmr; - u64 *dma; }; enum rds_ib_fr_state { -- cgit v1.2.3-59-g8ed1b From d43dbacfc06349309a99e50c575d86bc36ca4178 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 20 Jan 2017 13:04:10 -0800 Subject: IB/core: Change the type of an ib_dma_alloc_coherent() argument Change the type of the dma_handle argument from u64 * to dma_addr_t *. This patch does not change any functionality. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford --- include/rdma/ib_verbs.h | 13 ++++++------- net/rds/ib.h | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'net') diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index c2f2f54dbd49..694e39e4f1ff 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -3172,19 +3172,18 @@ static inline void ib_dma_sync_single_for_device(struct ib_device *dev, */ static inline void *ib_dma_alloc_coherent(struct ib_device *dev, size_t size, - u64 *dma_handle, + dma_addr_t *dma_handle, gfp_t flag) { - if (dev->dma_ops) - return dev->dma_ops->alloc_coherent(dev, size, dma_handle, flag); - else { - dma_addr_t handle; + if (dev->dma_ops) { + u64 handle; void *ret; - ret = dma_alloc_coherent(dev->dma_device, size, &handle, flag); + ret = dev->dma_ops->alloc_coherent(dev, size, &handle, flag); *dma_handle = handle; return ret; } + return dma_alloc_coherent(dev->dma_device, size, dma_handle, flag); } /** @@ -3196,7 +3195,7 @@ static inline void *ib_dma_alloc_coherent(struct ib_device *dev, */ static inline void ib_dma_free_coherent(struct ib_device *dev, size_t size, void *cpu_addr, - u64 dma_handle) + dma_addr_t dma_handle) { if (dev->dma_ops) dev->dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); diff --git a/net/rds/ib.h b/net/rds/ib.h index 45ac8e8e58f4..d21ca88ab628 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h @@ -134,7 +134,7 @@ struct rds_ib_connection { struct rds_ib_work_ring i_send_ring; struct rm_data_op *i_data_op; struct rds_header *i_send_hdrs; - u64 i_send_hdrs_dma; + dma_addr_t i_send_hdrs_dma; struct rds_ib_send_work *i_sends; atomic_t i_signaled_sends; @@ -144,7 +144,7 @@ struct rds_ib_connection { struct rds_ib_incoming *i_ibinc; u32 i_recv_data_rem; struct rds_header *i_recv_hdrs; - u64 i_recv_hdrs_dma; + dma_addr_t i_recv_hdrs_dma; struct rds_ib_recv_work *i_recvs; u64 i_ack_recv; /* last ACK received */ struct rds_ib_refill_cache i_cache_incs; @@ -161,7 +161,7 @@ struct rds_ib_connection { struct rds_header *i_ack; struct ib_send_wr i_ack_wr; struct ib_sge i_ack_sge; - u64 i_ack_dma; + dma_addr_t i_ack_dma; unsigned long i_ack_queued; /* Flow control related information -- cgit v1.2.3-59-g8ed1b From 5f68dcaff5524007ebaeafb45e9e9477f4da2a73 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 20 Jan 2017 13:04:34 -0800 Subject: RDS: net: Switch from dma_device to dev.parent Prepare for removal of ib_device.dma_device. Signed-off-by: Bart Van Assche Cc: Santosh Shilimkar Acked-by: Santosh Shilimkar Signed-off-by: Doug Ledford --- net/rds/ib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/rds/ib.h b/net/rds/ib.h index d21ca88ab628..4a520826da23 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h @@ -223,7 +223,7 @@ struct rds_ib_device { struct work_struct free_work; }; -#define ibdev_to_node(ibdev) dev_to_node(ibdev->dma_device) +#define ibdev_to_node(ibdev) dev_to_node((ibdev)->dev.parent) #define rdsibdev_to_node(rdsibdev) ibdev_to_node(rdsibdev->dev) /* bits for i_ack_flags */ -- cgit v1.2.3-59-g8ed1b