Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5173465rwb; Tue, 6 Sep 2022 20:54:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR59CqKeCp3kFddpmouWH7dcVEkLQu18F9hLisB1bGJ5NL2xbV52ayMqZrQxApfxLKUSQ0Ij X-Received: by 2002:aa7:d617:0:b0:44e:d2de:3fe1 with SMTP id c23-20020aa7d617000000b0044ed2de3fe1mr1430930edr.104.1662522850184; Tue, 06 Sep 2022 20:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662522850; cv=none; d=google.com; s=arc-20160816; b=QS4UKCZwboj3D1aJM7gbhcbOMXn4xEkBiMrpzDbmrsV6Ofy/BHA9jhcOajSFenLzyH sV7S7+MHZUw2ejrmaoZLnGq5BmDsfoqwswAGGJYnw+e6MfUHuxycwooj2QwezHq8WwxX K5J6yQ8k0QvYKpyGRdK3+XM6po565xQibTjmfmrMQgjQjgnMX4djXZP/tc4OzMt90rvm G5J7fE9A1MLfg2Af/UAi6tghFJ5xfYWlU5VBFXLkoV3TgJ2NGMo11tYr8DHvdxmnu1S6 a6st7VAbEjbdU8mRe99WTS7+VIjMIljphP71+HQqbwrN/Co37PZ+CPbEY9eBvlXJdJNG 3pdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=VI732QrrlddOQ3lYCq4ZZtl3MuipsnIW8IlRATlOj8Y=; b=G7bXQtZTAU3TDrvf+9MhCZED9lgx9s/u4Gsf45tUTBzL0Ya/oILE5oxCxoD7PU6gaI rIHujhrJmkCxj4Xx+K2KQz2p2LsvcIUeB0gK2Xbzn6429oABUkkLs49hhFAovtMdjA6h a3D3prBdrVCRLrbRQF+8/AS+jI2LPXEdkynqtfb0/X8PS5KWtzypqjSvd0aL+nmkN6cu E6YtkoiSo+Ta6YQoe57mzNJplrP7FatRiQkkYwQPLM/b7chQR4X3DbJQyw7P1jR7hOVF g22XZ2tuVNRkgKUg1agNnHNmkDUbDmU2uHOR5rRJMpoR2aE5bZqOURdZ+RXBaPIo9vhZ RHiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a50e60c000000b004486942c31bsi10302346edm.274.2022.09.06.20.53.43; Tue, 06 Sep 2022 20:54:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbiIGDlO (ORCPT + 99 others); Tue, 6 Sep 2022 23:41:14 -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 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,MAY_BE_FORGED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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]); -- 2.18.2