Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Kamal Heib <kamalheib1@gmail.com>
To: linux-rdma@vger.kernel.org
Cc: Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Zhu Yanjun <yanjunz@mellanox.com>,
	Kamal Heib <kamalheib1@gmail.com>
Subject: [PATCH for-next 1/4] RDMA/rxe: Drop pointless checks in rxe_init_ports
Date: Fri,  3 Jul 2020 18:34:25 +0300	[thread overview]
Message-ID: <20200703153428.173758-2-kamalheib1@gmail.com> (raw)
In-Reply-To: <20200703153428.173758-1-kamalheib1@gmail.com>

Both pkey_tbl_len and gid_tbl_len are set in rxe_init_port_param() - so
no need to check if they aren't set.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 5642eefb4ba1..c7191b5e04a5 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -147,9 +147,6 @@ static int rxe_init_ports(struct rxe_dev *rxe)
 
 	rxe_init_port_param(port);
 
-	if (!port->attr.pkey_tbl_len || !port->attr.gid_tbl_len)
-		return -EINVAL;
-
 	port->pkey_tbl = kcalloc(port->attr.pkey_tbl_len,
 			sizeof(*port->pkey_tbl), GFP_KERNEL);
 
-- 
2.25.4


  reply	other threads:[~2020-07-03 15:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 15:34 [PATCH for-next 0/4] RDMA/rxe: Cleanups and improvements Kamal Heib
2020-07-03 15:34 ` Kamal Heib [this message]
2020-07-03 15:34 ` [PATCH for-next 2/4] RDMA/rxe: Return void from rxe_init_port_param() Kamal Heib
2020-07-03 15:34 ` [PATCH for-next 3/4] RDMA/rxe: Return void from rxe_mem_init_dma() Kamal Heib
2020-07-03 15:34 ` [PATCH for-next 4/4] RDMA/rxe: Remove rxe_link_layer() Kamal Heib
2020-07-04  4:18   ` Zhu Yanjun
2020-07-05 10:27     ` Kamal Heib
2020-07-05  1:49   ` Zhu Yanjun
2020-07-05  7:46     ` Leon Romanovsky
2020-07-05 10:30     ` Kamal Heib

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200703153428.173758-2-kamalheib1@gmail.com \
    --to=kamalheib1@gmail.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yanjunz@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox