OSDN Git Service

RDMA/providers: Fix return value from create_srq callbacks
authorKamal Heib <kamalheib1@gmail.com>
Mon, 30 Jul 2018 18:56:43 +0000 (21:56 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 31 Jul 2018 02:29:45 +0000 (20:29 -0600)
The proper return code is "-EOPNOTSUPP" when the create_srq() callback
is not supported.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/mthca/mthca_provider.c
drivers/infiniband/sw/rdmavt/srq.c

index 5d955b2..bbfb86e 100644 (file)
@@ -1397,7 +1397,7 @@ struct ib_srq *bnxt_re_create_srq(struct ib_pd *ib_pd,
        }
 
        if (srq_init_attr->srq_type != IB_SRQT_BASIC) {
-               rc = -ENOTSUPP;
+               rc = -EOPNOTSUPP;
                goto exit;
        }
 
index 20febaf..0d3473b 100644 (file)
@@ -449,7 +449,7 @@ static struct ib_srq *mthca_create_srq(struct ib_pd *pd,
        int err;
 
        if (init_attr->srq_type != IB_SRQT_BASIC)
-               return ERR_PTR(-ENOSYS);
+               return ERR_PTR(-EOPNOTSUPP);
 
        srq = kmalloc(sizeof *srq, GFP_KERNEL);
        if (!srq)
index 3707952..78e06fc 100644 (file)
@@ -82,7 +82,7 @@ struct ib_srq *rvt_create_srq(struct ib_pd *ibpd,
        struct ib_srq *ret;
 
        if (srq_init_attr->srq_type != IB_SRQT_BASIC)
-               return ERR_PTR(-ENOSYS);
+               return ERR_PTR(-EOPNOTSUPP);
 
        if (srq_init_attr->attr.max_sge == 0 ||
            srq_init_attr->attr.max_sge > dev->dparms.props.max_srq_sge ||