From patchwork Wed Nov 21 10:52:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 10692379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 87A4213AD for ; Wed, 21 Nov 2018 10:52:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 743502B8AA for ; Wed, 21 Nov 2018 10:52:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6528B2B8C3; Wed, 21 Nov 2018 10:52:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 028062B8AA for ; Wed, 21 Nov 2018 10:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728554AbeKUV0g (ORCPT ); Wed, 21 Nov 2018 16:26:36 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:35192 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726172AbeKUV0g (ORCPT ); Wed, 21 Nov 2018 16:26:36 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wALAhfw6104505; Wed, 21 Nov 2018 10:52:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=siUtzQs6AolhZKoJNfm35c8ETwm5egCZY/FgOI2Z1SY=; b=vv/nVFBlCHhVjVhCLCHZJMnbfGEdexQl7V0EOcMN0i+9lt6mSH8q5megeCckpkKJfted MGdnnr43to6Z9cWyS1si9Y7VBcAjdogpl7po90bF57fF6h6k2IB9auG8s1akzRFuirYF oExjjSsyCwnrs6t6l5klzGEKSuM7BIGYLiwE5QGm/5oqJRsvJtdGgXptIcju9D9ITMr/ CFqBEdZ6hjwwnn63/EWEfE+4qAsaNK9BZjlr2fHgZP3amjSXtLEjWG/aX3h2llUVUpg/ 3OQq237x97E+0U6ZeNuB1ob0QJAxElcEh5O0RAcu897038yK3/w2FpSiYMFlE1i1yUMI Bw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2ntadu0vh7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Nov 2018 10:52:28 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wALAqSEl000867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Nov 2018 10:52:28 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wALAqRMh031391; Wed, 21 Nov 2018 10:52:27 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 21 Nov 2018 02:52:26 -0800 From: Yuval Shaia To: dledford@redhat.com, jgg@mellanox.com, sagi@grimberg.me, maxg@mellanox.com, leon@kernel.org, dennis.dalessandro@intel.com, swise@opengridcomputing.com, keescook@chromium.org, rd.dunlab@gmail.com, yuval.shaia@oracle.com, linux-rdma@vger.kernel.org, haakon.bugge@oracle.com Subject: [PATCH] IB/core: Make function ib_fmr_pool_unmap return void Date: Wed, 21 Nov 2018 12:52:09 +0200 Message-Id: <20181121105209.14726-1-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9083 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=796 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811210098 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since function always return 0 make it void. Reported-by: HÃ¥kon Bugge Signed-off-by: Yuval Shaia Reviewed-by: Zhu Yanjun --- drivers/infiniband/core/fmr_pool.c | 4 +--- drivers/infiniband/ulp/iser/iser_memory.c | 4 +--- include/rdma/ib_fmr_pool.h | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) 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..2476c0440c7d 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@ -284,9 +284,7 @@ void iser_unreg_mem_fmr(struct iscsi_iser_task *iser_task, 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 */