From patchwork Wed Jul 4 18:46:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10507503 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 C84416028F for ; Wed, 4 Jul 2018 18:47:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCB8E288EF for ; Wed, 4 Jul 2018 18:47:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0E9228949; Wed, 4 Jul 2018 18:47:14 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 555FE288EF for ; Wed, 4 Jul 2018 18:47:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752251AbeGDSrN (ORCPT ); Wed, 4 Jul 2018 14:47:13 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:50456 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568AbeGDSrM (ORCPT ); Wed, 4 Jul 2018 14:47:12 -0400 Received: by mail-wm0-f67.google.com with SMTP id v25-v6so7486938wmc.0 for ; Wed, 04 Jul 2018 11:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aRU8KeOCQhXwL8rSNkpPr3Ef0Aonlgn3k30V6Q62cFM=; b=Iol3k6YgH/HarjQoehiVk08nvu/Q4PMPJgmWRe0C2Q/zrF3NsBUaosf6EqkruZkSEd RQUoZcERdJaLCr0X9SoHLs7ITPFDtSGMYopwTKrUDtikcuG/Arm8kvr4hE68BfNvpS/e aCvIJeEVOU3zZWAKTsiYNDKQm10XEssdOcPmfBHKhsSdM55IKYF4F8I+S2XjkcTlMMh+ +vGBfa8gAmXKgdUUS00M20D76W7sgiCrmp/0O61bitVgCnST02dOzwj8WjJey23dEYGq 0Bi7l19PpJe9ABt+WPZOk2Ao3/S1TW5JXRTjGVkeVZzzj6jJCv4588WruKHY8xo9ONlF 6Xfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aRU8KeOCQhXwL8rSNkpPr3Ef0Aonlgn3k30V6Q62cFM=; b=hJUnQ8+BvwJF/ltZUUHzVWsRtm1D0+QjGu4xrg4V4BAafzBuKs+P1FZYDa5kRLV3lp 1ixkVpalsVTDCvZ1Ql4PqxYzdKtRAj7pOI2egVT1S9DbTRgswUJX9Trv3/enE4fiZobT 9fJuB1VPqkAcWR1uzY7kQs8amJRk+KBRyoInP+lJfEAKLmhnlqtMoL87WPySZipnievk Nt4FEdliX8HQXAHhUXa89Bnf15ATfIyYTV99uUcqQBNFN8rfZywLjcyFQyyYSEez3D4U 67yg9zxwMbb2aOxiCnS6QZlCd5L7TWhpcBZu+xea5dD/jalNr1r2Mf9pskQ5ME84ojiE OuqA== X-Gm-Message-State: APt69E3xjcgvAhu89fSfZdh76d//CIAq3n8H4a8UsMZPLHe9sc4wrtaG 4A0VU4cOPGzzisLR1JQlhQg= X-Google-Smtp-Source: AAOMgpdjPTwnS2vhC6dA+JUPb+/kVJTi8PRbYGRAZfrK8ZoLUII4/YVtxV2n1Rb3S7Xii2psD8IczQ== X-Received: by 2002:adf:d08c:: with SMTP id y12-v6mr2468417wrh.152.1530730031057; Wed, 04 Jul 2018 11:47:11 -0700 (PDT) Received: from localhost.localdomain (bzq-79-179-11-238.red.bezeqint.net. [79.179.11.238]) by smtp.gmail.com with ESMTPSA id s12-v6sm262953wmc.2.2018.07.04.11.47.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 11:47:10 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next 4/5] RDMA/ipoib: Fix return code from ipoib_cm_dev_init Date: Wed, 4 Jul 2018 21:46:50 +0300 Message-Id: <20180704184651.26728-5-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180704184651.26728-1-kamalheib1@gmail.com> References: <20180704184651.26728-1-kamalheib1@gmail.com> 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 The proper return code is -EOPNOTSUPP and not -ENOSYS when the function isn't supported. Signed-off-by: Kamal Heib --- drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 3dd130afb571..e255a7e5a4c3 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -729,7 +729,7 @@ void ipoib_cm_dev_stop(struct net_device *dev) static inline int ipoib_cm_dev_init(struct net_device *dev) { - return -ENOSYS; + return -EOPNOTSUPP; } static inline diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c index ba4669f24014..2872cd12bc6e 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c @@ -168,7 +168,7 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca) else size += ipoib_recvq_size * ipoib_max_conn_qp; } else - if (ret != -ENOSYS) + if (ret != -EOPNOTSUPP) return -ENODEV; req_vec = (priv->port - 1) * 2;