Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp672214ybh; Sat, 3 Aug 2019 07:25:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxG16OReqIsEaZvcFEavCuyaJKk0XGO6QkEla2xx1d/9f6gQaRMxBa9Qps/AJTeH0fSwRR X-Received: by 2002:a17:902:a409:: with SMTP id p9mr137619042plq.218.1564842321516; Sat, 03 Aug 2019 07:25:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564842321; cv=none; d=google.com; s=arc-20160816; b=FqlaD463nkQlLMNaU/PdTUjyoP05uthpMk7+laHJXrEekKBXEq8pLHTFeoXMMXwW3A ZK/FQanryUf6er4EVkFBlM3h1VnK97VwMYsY+AyTDEf8xcFdgknZJb5fRVg3Zk1CdVtn KiTIZSON93QGlwn7vwIS4hU9bA6/CskiPh7m2sKEL7HsKs0plwzcfCUxZhiYwbDbSyuJ qPPBz3QE3DKwStVaxczsQHQ6/FGydgPqXegSjTyfqy3aTNbFE+WM5JdDMnYME2pP2gJL zrFhkUO5fvKGZZIF0K2jZrwTtICakrX5yFLODtGLHjoN5M4LX9Sw/ZvBcFLGXSDCVjsi BAhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=eiPxiiNOw6yPODoVtINX43qlQT9BsKwOB2YnQWOr0oA=; b=Kb61wJqB+we9tIrPukB+BoVqS2Mz4U3XzDp8LByeS4AjCs76uXhdG1xQHfc7PQH3vC vJym2bZ+ZOFAPPvFSwXzPlXc98k/jWUlbnt3rQmXfZsMSmFwtQ6fFH/3UbhRh+P4rmIf DzvNMNm9Jo8HMhaK4NPVQ90saVh8qlNcN5v64yK4ooRLp4H7xtmQzImwVIZLJ4BhCKRo MYbYxSSZWW6ItXX73oR6T4y7hcMACT0fF7coQTHwVWBkhu4hg5X6kOOnvRtwDUn9z2F/ xLeWStFtv2GKyG0g9LfNg3Evutbw2dCGN9WsQteuISNV/ZhZ6nQ6SPxKOMXVRA+QnGbe Sv0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si39491034pfa.123.2019.08.03.07.25.07; Sat, 03 Aug 2019 07:25:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730310AbfHBPNU (ORCPT + 99 others); Fri, 2 Aug 2019 11:13:20 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:57246 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730060AbfHBPNU (ORCPT ); Fri, 2 Aug 2019 11:13:20 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1htZF6-0007Y0-Da; Fri, 02 Aug 2019 15:13:16 +0000 From: Colin King To: Saeed Mahameed , Leon Romanovsky , "David S . Miller" , netdev@vger.kernel.org, linux-rdma@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][net-next][V2] net/mlx5: remove self-assignment on esw->dev Date: Fri, 2 Aug 2019 16:13:16 +0100 Message-Id: <20190802151316.16011-1-colin.king@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King There is a self assignment of esw->dev to itself, clean this up by removing it. Also make dev a const pointer. Addresses-Coverity: ("Self assignment") Fixes: 6cedde451399 ("net/mlx5: E-Switch, Verify support QoS element type") Signed-off-by: Colin Ian King --- V2: make dev const --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index f4ace5f8e884..de0894b695e3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -1413,7 +1413,7 @@ static int esw_vport_egress_config(struct mlx5_eswitch *esw, static bool element_type_supported(struct mlx5_eswitch *esw, int type) { - struct mlx5_core_dev *dev = esw->dev = esw->dev; + const struct mlx5_core_dev *dev = esw->dev; switch (type) { case SCHEDULING_CONTEXT_ELEMENT_TYPE_TSAR: -- 2.20.1