From patchwork Wed Apr 4 04:06:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parav Pandit X-Patchwork-Id: 10322043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D606C60318 for ; Wed, 4 Apr 2018 04:06:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB17B28DCA for ; Wed, 4 Apr 2018 04:06:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE4AC28DCC; Wed, 4 Apr 2018 04:06:39 +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=-6.9 required=2.0 tests=BAYES_00, 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 2CBFF28DCA for ; Wed, 4 Apr 2018 04:06:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750747AbeDDEG1 (ORCPT ); Wed, 4 Apr 2018 00:06:27 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:41902 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750746AbeDDEG1 (ORCPT ); Wed, 4 Apr 2018 00:06:27 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from parav@mellanox.com) with ESMTPS (AES256-SHA encrypted); 4 Apr 2018 07:07:24 +0300 Received: from sw-mtx-036.mtx.labs.mlnx (sw-mtx-036.mtx.labs.mlnx [10.12.150.149]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w3446KRb027973; Wed, 4 Apr 2018 07:06:21 +0300 From: Parav Pandit To: dledford@redhat.com, jgg@mellanox.com Cc: leonro@mellanox.com, linux-rdma@vger.kernel.org, markb@mellanox.com, parav@mellanox.com Subject: [PATCH] IB/rxe: Removed GID add/del dummy routines Date: Tue, 3 Apr 2018 23:06:18 -0500 Message-Id: <1522814778-19318-1-git-send-email-parav@mellanox.com> X-Mailer: git-send-email 1.8.3.1 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 rxe driver's add_gid() and del_gid() callbacks are doing simple checks which are already done by the ib core before invoking these callback routines. Therefore, code is simplified to skip implementing add_gid() and del_gid() callback functions. They are only invoked by ib_core if they are implemented. Signed-off-by: Parav Pandit Reviewed-by: Leon Romanovsky --- drivers/infiniband/sw/rxe/rxe_verbs.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index 4f8a2de..8f2243b 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -83,21 +83,6 @@ static int rxe_query_gid(struct ib_device *device, return 0; } -static int rxe_add_gid(const union ib_gid *gid, - const struct ib_gid_attr *attr, void **context) -{ - if (attr->index >= RXE_PORT_GID_TBL_LEN) - return -EINVAL; - return 0; -} - -static int rxe_del_gid(const struct ib_gid_attr *attr, void **context) -{ - if (attr->index >= RXE_PORT_GID_TBL_LEN) - return -EINVAL; - return 0; -} - static struct net_device *rxe_get_netdev(struct ib_device *device, u8 port_num) { @@ -1271,8 +1256,6 @@ int rxe_register_device(struct rxe_dev *rxe) dev->get_link_layer = rxe_get_link_layer; dev->query_gid = rxe_query_gid; dev->get_netdev = rxe_get_netdev; - dev->add_gid = rxe_add_gid; - dev->del_gid = rxe_del_gid; dev->query_pkey = rxe_query_pkey; dev->alloc_ucontext = rxe_alloc_ucontext; dev->dealloc_ucontext = rxe_dealloc_ucontext;