diff mbox series

[v2] IB/core: Make function ib_fmr_pool_unmap return void

Message ID 20181121114702.15329-1-yuval.shaia@oracle.com (mailing list archive)
State Accepted
Commit 3eeeb7a59acddaa326b03efdf6dce61c120449a3
Delegated to: Jason Gunthorpe
Headers show
Series [v2] IB/core: Make function ib_fmr_pool_unmap return void | expand

Commit Message

Yuval Shaia Nov. 21, 2018, 11:47 a.m. UTC
Since function always return 0 make it void.

Reported-by: Håkon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
---
v1 -> v2:
	* Address Leon's comment re delete ret decl
---
 drivers/infiniband/core/fmr_pool.c        | 4 +---
 drivers/infiniband/ulp/iser/iser_memory.c | 5 +----
 include/rdma/ib_fmr_pool.h                | 2 +-
 3 files changed, 3 insertions(+), 8 deletions(-)

Comments

Leon Romanovsky Nov. 21, 2018, 12:09 p.m. UTC | #1
On Wed, Nov 21, 2018 at 01:47:02PM +0200, Yuval Shaia wrote:
> Since function always return 0 make it void.
>
> Reported-by: Håkon Bugge <haakon.bugge@oracle.com>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
> v1 -> v2:
> 	* Address Leon's comment re delete ret decl
> ---
>  drivers/infiniband/core/fmr_pool.c        | 4 +---
>  drivers/infiniband/ulp/iser/iser_memory.c | 5 +----
>  include/rdma/ib_fmr_pool.h                | 2 +-
>  3 files changed, 3 insertions(+), 8 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Sagi Grimberg Nov. 21, 2018, 10:33 p.m. UTC | #2
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Jason Gunthorpe Nov. 21, 2018, 11:53 p.m. UTC | #3
On Wed, Nov 21, 2018 at 01:47:02PM +0200, Yuval Shaia wrote:
> Since function always return 0 make it void.
> 
> Reported-by: Håkon Bugge <haakon.bugge@oracle.com>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> Acked-by: Sagi Grimberg <sagi@grimberg.me>
> ---
> v1 -> v2:
> 	* Address Leon's comment re delete ret decl
> ---
>  drivers/infiniband/core/fmr_pool.c        | 4 +---
>  drivers/infiniband/ulp/iser/iser_memory.c | 5 +----
>  include/rdma/ib_fmr_pool.h                | 2 +-
>  3 files changed, 3 insertions(+), 8 deletions(-)

Applied to for-next

Thanks,
Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
index 83ba0068e8bb..b00dfd2ad31e 100644
--- a/drivers/infiniband/core/fmr_pool.c
+++ b/drivers/infiniband/core/fmr_pool.c
@@ -474,7 +474,7 @@  EXPORT_SYMBOL(ib_fmr_pool_map_phys);
  * Unmap an FMR.  The FMR mapping may remain valid until the FMR is
  * reused (or until ib_flush_fmr_pool() is called).
  */
-int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
+void ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
 {
 	struct ib_fmr_pool *pool;
 	unsigned long flags;
@@ -503,7 +503,5 @@  int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
 #endif
 
 	spin_unlock_irqrestore(&pool->pool_lock, flags);
-
-	return 0;
 }
 EXPORT_SYMBOL(ib_fmr_pool_unmap);
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c
index 009be8889d71..dbe97c02848c 100644
--- a/drivers/infiniband/ulp/iser/iser_memory.c
+++ b/drivers/infiniband/ulp/iser/iser_memory.c
@@ -277,16 +277,13 @@  void iser_unreg_mem_fmr(struct iscsi_iser_task *iser_task,
 			enum iser_data_dir cmd_dir)
 {
 	struct iser_mem_reg *reg = &iser_task->rdma_reg[cmd_dir];
-	int ret;
 
 	if (!reg->mem_h)
 		return;
 
 	iser_dbg("PHYSICAL Mem.Unregister mem_h %p\n", reg->mem_h);
 
-	ret = ib_fmr_pool_unmap((struct ib_pool_fmr *)reg->mem_h);
-	if (ret)
-		iser_err("ib_fmr_pool_unmap failed %d\n", ret);
+	ib_fmr_pool_unmap((struct ib_pool_fmr *)reg->mem_h);
 
 	reg->mem_h = NULL;
 }
diff --git a/include/rdma/ib_fmr_pool.h b/include/rdma/ib_fmr_pool.h
index f62b842e6596..f8982e4e9702 100644
--- a/include/rdma/ib_fmr_pool.h
+++ b/include/rdma/ib_fmr_pool.h
@@ -88,6 +88,6 @@  struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
 					 int                 list_len,
 					 u64                 io_virtual_address);
 
-int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr);
+void ib_fmr_pool_unmap(struct ib_pool_fmr *fmr);
 
 #endif /* IB_FMR_POOL_H */