From patchwork Wed Jul 4 21:52: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: 10507709 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 53E73603D7 for ; Wed, 4 Jul 2018 21:53:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CA5728D83 for ; Wed, 4 Jul 2018 21:53:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40FF028DAB; Wed, 4 Jul 2018 21:53:17 +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 DC00428DA2 for ; Wed, 4 Jul 2018 21:53:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753002AbeGDVxO (ORCPT ); Wed, 4 Jul 2018 17:53:14 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36163 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752888AbeGDVxJ (ORCPT ); Wed, 4 Jul 2018 17:53:09 -0400 Received: by mail-wm0-f66.google.com with SMTP id s14-v6so7998311wmc.1 for ; Wed, 04 Jul 2018 14:53:09 -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=YaxXrwEskZq1U7TVqGST4vo8oBUpvgPTBX7vK8n5zft0B0gKql2W1wen1RSVSvdX7f +VWaIMGtvwEGSxxzkfc7ZWOKkWu33Afrajtj5+yOrNGN9z/D8IF2wgASSCeEpq4fB5Vo vTi7NRL0SLRLszsbmKZ1QRqMSr/0NeqgunLZyqJ4GEmpahbhNvkRbxQilG9C3+r3M3mN Fy+RTEzHYqS4+s/JKjR/Wu+zhxiAAa9qR96KLIqo5L+NxaLGxRRFJcTQHwvaU2GyWbtU /RqoTb7FSq8bPxxaaDuw+WbsOyjDlx3yoIZ/4XHUgcTooEwUiOaF0tGkBpBSSZKv8TzM soOQ== 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=CEurBmXmnaPNKcAp1SNU/fsncgpRZ82LAWHvP+9VKnYAyAbMITT854B781qxieYlXb 6ALnFTBMtu0GA2dyROGpz/va/te6pJ0LbaGmDtXhv2f21r8kXso9s/pRcuiCkIdcWmUV x1B3k3EIIrjgIgVbPHhvp3VJ3holJzLcTVoF3bD3Cv7hvVD59mZXleZKvkZwJeXGtCjP c0i1YMwGUI4ZG32MeSJ2flbBgDBBiJibIT7ClZcYGn24r6mPshxG1lbq06solIcKlsux 6bktt1e79yrnYYshcL35S9K2Z7GSPe/8AJMA53xrzsERTlRiZmYASiQV1glFkmijIBjm SoOA== X-Gm-Message-State: APt69E1/p3bkV26UKwieesGCrnn3mHG4omdIAN1dqyCFNDrUWddJ3UbQ mlZiWHbRmpM+wCd0qOs5jHo= X-Google-Smtp-Source: AAOMgpd3Js86k05KR2ji68LrTznL3TqJExInlws3/jabxU2U7pNL/K0H/VIdp/lXkqWmRfjLl9M2kA== X-Received: by 2002:adf:9246:: with SMTP id 64-v6mr2762651wrj.109.1530741188809; Wed, 04 Jul 2018 14:53:08 -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 d102-v6sm9005353wma.10.2018.07.04.14.53.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 14:53:08 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe , Leon Romanovsky Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next V2 4/5] RDMA/ipoib: Fix return code from ipoib_cm_dev_init Date: Thu, 5 Jul 2018 00:52:50 +0300 Message-Id: <20180704215251.10698-5-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180704215251.10698-1-kamalheib1@gmail.com> References: <20180704215251.10698-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 Reviewed-by: Leon Romanovsky --- 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;