From patchwork Thu Dec 14 22:35:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10113397 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3699560352 for ; Thu, 14 Dec 2017 22:37:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2992A29D23 for ; Thu, 14 Dec 2017 22:37:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E76329D29; Thu, 14 Dec 2017 22:37:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE1F129D23 for ; Thu, 14 Dec 2017 22:37:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753916AbdLNWhN (ORCPT ); Thu, 14 Dec 2017 17:37:13 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:36339 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753990AbdLNWhK (ORCPT ); Thu, 14 Dec 2017 17:37:10 -0500 Received: by mail-wr0-f196.google.com with SMTP id u19so85825wrc.3 for ; Thu, 14 Dec 2017 14:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BbXxuC7mlLRZeN/plvqBKaxA+e2o/uAQr7gjhoquIPM=; b=VE9bpPDSh+FirSePIKNinaB/vIV9wgahYsziPMOp+bGJbFMcP337MGoiKRaK4zd6R2 zEUP3h8kH8megFEOVNJ3iJS6Ob4tKx7mgWnnljBSizM1R1xzuHNZ8McfVRCS6PM6oqVF Bi0F15kmsjTj0PmcfBr997jQLohaGK9m/p89hFk6RSCCeRAkQHRFHhUZGYACyKttfAwu YBqpbeGx1745sxicuwdOmqDzN0zkKHDWJQ3v9TwUR6NCho3cZ6W2NJujC2hF0QXgnlXs fpEps368b1hJxNLVRdof9SomWU6KwI8uZ8fDPFYfQZ9ngE5V1+heEoBKbuBFXVQ8I+RO /IFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BbXxuC7mlLRZeN/plvqBKaxA+e2o/uAQr7gjhoquIPM=; b=Ln/S06YRUHH+BwWCPi1mZMl86JSqSh1Y4VzRrCJlX2sL2JFF5dSgkk1cusHOhzRbfx faJuIufW67eCt04xU0D6u8T4hwgkXyAuxN3FYUM4DFe7izQ6++231T5sPJsnCuu6VUw0 iVgRwDM9V/TikoxLFa5sBZriipclCEsJIWfL4C9iZcUPd7D2Uk4/lvvu8LFbvNRPk55C Zd32q+J+FekBVQBzqeOHIH5EszwltjJWpqGcrYIwQPUQ8QVxcU23bHy6DT1IgiFYPVY/ gd9ztHEjjZRCUTzUQJkzzbq7swbIBXXdz6Cu5M8m1e6aOk+lGzlUSuDk6/bxitAqCfD2 zprg== X-Gm-Message-State: AKGB3mLje02XzE4OWzUrWirJA/j2lIGu4Qe1SoDDst5zIumC/jrkl63k 4EwC+3m4KJM3qyIgxpsUkcscMbWZ1gE= X-Google-Smtp-Source: ACJfBoum6qcoVTuVB4QXMvvszepM9HLI7a0p4h2HWFSFc42MOCYKPpelEL75uie43tx1F1AmCAadWg== X-Received: by 10.223.164.218 with SMTP id h26mr6861674wrb.271.1513291029149; Thu, 14 Dec 2017 14:37:09 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [70.74.179.152]) by smtp.gmail.com with ESMTPSA id o88sm11386409wrc.10.2017.12.14.14.37.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Dec 2017 14:37:07 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1ePc7k-0007uf-BR; Thu, 14 Dec 2017 15:37:04 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH rdma-core 4/5] hns: Remove useless assignments Date: Thu, 14 Dec 2017 15:35:42 -0700 Message-Id: <20171214223544.30117-5-jgg@ziepe.ca> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171214223544.30117-1-jgg@ziepe.ca> References: <20171214223544.30117-1-jgg@ziepe.ca> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jason Gunthorpe We free the memory a few lines later, the first assign cannot do anything useful. No sense in zeroing a stack variable before exiting. Signed-off-by: Jason Gunthorpe --- providers/hns/hns_roce_u.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/providers/hns/hns_roce_u.c b/providers/hns/hns_roce_u.c index 9b5de441a3fdf1..489b71614614fe 100644 --- a/providers/hns/hns_roce_u.c +++ b/providers/hns/hns_roce_u.c @@ -167,10 +167,7 @@ static void hns_roce_free_context(struct ibv_context *ibctx) if (to_hr_dev(ibctx->device)->hw_version == HNS_ROCE_HW_VER1) munmap(context->cq_tptr_base, HNS_ROCE_CQ_DB_BUF_SIZE); - context->uar = NULL; - free(context); - context = NULL; } static void hns_uninit_device(struct verbs_device *verbs_device)