Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Li zeming <zeming@nfschina.com>
To: jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Li zeming <zeming@nfschina.com>
Subject: [PATCH] rdma/rdmavt_qp: Remove unnecessary 'NULL' values from qp
Date: Wed,  7 Sep 2022 11:36:04 +0800	[thread overview]
Message-ID: <20220907033604.4637-1-zeming@nfschina.com> (raw)

The pointer qp is assigned before it is used, it does not need to be
initialized and assigned.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 include/rdma/rdmavt_qp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h
index 2e58d5e6ac0e..2afc3300d618 100644
--- a/include/rdma/rdmavt_qp.h
+++ b/include/rdma/rdmavt_qp.h
@@ -699,7 +699,7 @@ static inline struct rvt_qp *rvt_lookup_qpn(struct rvt_dev_info *rdi,
 					    struct rvt_ibport *rvp,
 					    u32 qpn) __must_hold(RCU)
 {
-	struct rvt_qp *qp = NULL;
+	struct rvt_qp *qp;
 
 	if (unlikely(qpn <= 1)) {
 		qp = rcu_dereference(rvp->qp[qpn]);
-- 
2.18.2


             reply	other threads:[~2022-09-07  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  3:36 Li zeming [this message]
2022-09-07 12:37 ` [PATCH] rdma/rdmavt_qp: Remove unnecessary 'NULL' values from qp Leon Romanovsky

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=20220907033604.4637-1-zeming@nfschina.com \
    --to=zeming@nfschina.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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