Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/core: Make function ib_fmr_pool_unmap return void

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>

authored by

Yuval Shaia and committed by
Jason Gunthorpe
3eeeb7a5 89180e81

+3 -8
+1 -3
drivers/infiniband/core/fmr_pool.c
··· 474 474 * Unmap an FMR. The FMR mapping may remain valid until the FMR is 475 475 * reused (or until ib_flush_fmr_pool() is called). 476 476 */ 477 - int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr) 477 + void ib_fmr_pool_unmap(struct ib_pool_fmr *fmr) 478 478 { 479 479 struct ib_fmr_pool *pool; 480 480 unsigned long flags; ··· 503 503 #endif 504 504 505 505 spin_unlock_irqrestore(&pool->pool_lock, flags); 506 - 507 - return 0; 508 506 } 509 507 EXPORT_SYMBOL(ib_fmr_pool_unmap);
+1 -4
drivers/infiniband/ulp/iser/iser_memory.c
··· 277 277 enum iser_data_dir cmd_dir) 278 278 { 279 279 struct iser_mem_reg *reg = &iser_task->rdma_reg[cmd_dir]; 280 - int ret; 281 280 282 281 if (!reg->mem_h) 283 282 return; 284 283 285 284 iser_dbg("PHYSICAL Mem.Unregister mem_h %p\n", reg->mem_h); 286 285 287 - ret = ib_fmr_pool_unmap((struct ib_pool_fmr *)reg->mem_h); 288 - if (ret) 289 - iser_err("ib_fmr_pool_unmap failed %d\n", ret); 286 + ib_fmr_pool_unmap((struct ib_pool_fmr *)reg->mem_h); 290 287 291 288 reg->mem_h = NULL; 292 289 }
+1 -1
include/rdma/ib_fmr_pool.h
··· 88 88 int list_len, 89 89 u64 io_virtual_address); 90 90 91 - int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr); 91 + void ib_fmr_pool_unmap(struct ib_pool_fmr *fmr); 92 92 93 93 #endif /* IB_FMR_POOL_H */