From patchwork Wed Sep 7 03:36:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 12968414 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 657D6ECAAD3 for ; Wed, 7 Sep 2022 03:41:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229446AbiIGDlL (ORCPT ); Tue, 6 Sep 2022 23:41:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbiIGDlK (ORCPT ); Tue, 6 Sep 2022 23:41:10 -0400 X-Greylist: delayed 284 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 06 Sep 2022 20:41:09 PDT Received: from mail.nfschina.com (unknown [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 033E685FBC; Tue, 6 Sep 2022 20:41:08 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 82BC31E80D59; Wed, 7 Sep 2022 11:35:13 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yijZSSlu9mkU; Wed, 7 Sep 2022 11:35:10 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id C12A41E80D57; Wed, 7 Sep 2022 11:35:10 +0800 (CST) From: Li zeming To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] rdma/rdmavt_qp: Remove unnecessary 'NULL' values from qp Date: Wed, 7 Sep 2022 11:36:04 +0800 Message-Id: <20220907033604.4637-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The pointer qp is assigned before it is used, it does not need to be initialized and assigned. Signed-off-by: Li zeming --- 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]);