Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp558942ybm; Wed, 27 May 2020 02:17:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHd3kUyxU/L+D2sND/N0ae+WAJ7zpnguuC2qfVAL5vfMec+2btIMnKkCO+zBv6tarphXI3 X-Received: by 2002:a17:906:b2c1:: with SMTP id cf1mr5375244ejb.135.1590571043672; Wed, 27 May 2020 02:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590571043; cv=none; d=google.com; s=arc-20160816; b=ViMKe+Lx3t0NHpygAlnmhbgxoPQlQrNPRojlNhiKjQXBuFVRhdEd6qUdZN2CL5VH65 4qreA9VULpkdJDppMiCClsQtxTFc8VD2de690l+v7QoufcuiQmT8vZIKxYzQcVYxxDlB 90sJ2stRzCwxG4kjjJPCX4PIR5KZ/Uo6TSjm5pfkDSKfPRv+TT3q8KKBebLGOkq8hUk2 kKNiFSQ38xMLAdgrhvvSSufIl7VG3Wc5906AR8MjGl4oZjD6vpXCZBtbqxCH2fsJ2gRF D+ixvwuU/dUQLTK1EJejexMt8hmd8k5+qwcNz8f50gnYMc0wa+qpeuS9xyEk35jTeZ+u 6orQ== 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=FkgAyd22MIxTib+CJG446zsgw0Pi9Ac9l4D9Vf5/sX4=; b=I6XoaO83SDdITl7FV+uxr7xvZrOH5VNFawmvDBi6aebgHIM130wN+M/phXMepoRTKY 4yLWTkCy6at3N68P5xem3sIP0y6AU/smvZ/iSBc9Day4Nii8cd7qs++KX3F4PwXURab4 Xuz1tiZQs8YDMMb8iOUs9aTGtdYaMh+Dy6g1ldIaMiseMPL8OG/oIpdd/vLZHwm3Ni8A wLSlGMKxTt4mHtsEC8q+T3fIbarG6vubsLuLABBvTZc7g6FPn8NqqkjwdDkCiaZrR9P9 Vy1Io6cusHLfbQHf6+ihLx7tCY3AzU8fXmMMBiJq7O/EM5BEOpYkkKz/vc3p0oNZBTMH 6eZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id 3si1753078ejy.429.2020.05.27.02.17.00; Wed, 27 May 2020 02:17:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2404526AbgEZW4y (ORCPT + 99 others); Tue, 26 May 2020 18:56:54 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:34720 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404359AbgEZW4y (ORCPT ); Tue, 26 May 2020 18:56:54 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jdiV7-0003WM-HL; Tue, 26 May 2020 22:56:49 +0000 From: Colin King To: Jiri Pirko , Ido Schimmel , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mlxsw: spectrum_router: remove redundant initialization of pointer br_dev Date: Tue, 26 May 2020 23:56:49 +0100 Message-Id: <20200526225649.64257-1-colin.king@canonical.com> X-Mailer: git-send-email 2.25.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 The pointer br_dev is being initialized with a value that is never read and is being updated with a new value later on. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 71aee4914619..8f485f9a07a7 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -7572,11 +7572,12 @@ static struct mlxsw_sp_fid * mlxsw_sp_rif_vlan_fid_get(struct mlxsw_sp_rif *rif, struct netlink_ext_ack *extack) { - struct net_device *br_dev = rif->dev; + struct net_device *br_dev; u16 vid; int err; if (is_vlan_dev(rif->dev)) { + vid = vlan_dev_vlan_id(rif->dev); br_dev = vlan_dev_real_dev(rif->dev); if (WARN_ON(!netif_is_bridge_master(br_dev))) -- 2.25.1