From patchwork Wed Sep 15 01:24:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Yanjun X-Patchwork-Id: 12492467 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_12_24,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5E74C433EF for ; Tue, 14 Sep 2021 09:01:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BBE56610D1 for ; Tue, 14 Sep 2021 09:01:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229526AbhINJC3 (ORCPT ); Tue, 14 Sep 2021 05:02:29 -0400 Received: from mga06.intel.com ([134.134.136.31]:33889 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbhINJC2 (ORCPT ); Tue, 14 Sep 2021 05:02:28 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10106"; a="282933067" X-IronPort-AV: E=Sophos;i="5.85,292,1624345200"; d="scan'208";a="282933067" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2021 02:01:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,292,1624345200"; d="scan'208";a="507770835" Received: from unknown (HELO intel-173.bj.intel.com) ([10.238.154.173]) by fmsmga008.fm.intel.com with ESMTP; 14 Sep 2021 02:01:10 -0700 From: Zhu Yanjun To: dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org, leonro@nvidia.com Cc: Zhu Yanjun Subject: [PATCH 1/1] RDMA/rxe: remove the redundant variable Date: Tue, 14 Sep 2021 21:24:56 -0400 Message-Id: <20210915012456.476728-1-yanjun.zhu@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Zhu Yanjun The variable port is not necessary. So remove it. Signed-off-by: Zhu Yanjun --- drivers/infiniband/sw/rxe/rxe_verbs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index 267b5a9c345d..586ef102986e 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -29,13 +29,10 @@ static int rxe_query_port(struct ib_device *dev, u32 port_num, struct ib_port_attr *attr) { struct rxe_dev *rxe = to_rdev(dev); - struct rxe_port *port; int rc; - port = &rxe->port; - /* *attr being zeroed by the caller, avoid zeroing it here */ - *attr = port->attr; + *attr = rxe->port.attr; mutex_lock(&rxe->usdev_lock); rc = ib_get_eth_speed(dev, port_num, &attr->active_speed,