IB/core: Make function ib_fmr_pool_unmap return void
authorYuval Shaia <yuval.shaia@oracle.com>
Wed, 21 Nov 2018 11:47:02 +0000 (13:47 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 21 Nov 2018 23:13:02 +0000 (16:13 -0700)
Since the function always returns 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>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/fmr_pool.c
drivers/infiniband/ulp/iser/iser_memory.c
include/rdma/ib_fmr_pool.h

index 83ba006..b00dfd2 100644 (file)
@@ -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);
index 009be88..dbe97c0 100644 (file)
@@ -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;
 }
index f62b842..f8982e4 100644 (file)
@@ -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 */