Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3804020pxf; Tue, 6 Apr 2021 00:08:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+eLRNAVrF8QpZ9XgMhExGxk4gI3aRAGaBZa09so0Ri2IHDsyUCQ0Ao9jVyt3wi+4VwAu8 X-Received: by 2002:a05:6638:378c:: with SMTP id w12mr27398889jal.127.1617692896927; Tue, 06 Apr 2021 00:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617692896; cv=none; d=google.com; s=arc-20160816; b=tBhA60kr5GlZyh7wbKVqZ32roct+7K/azstFMcEl4tzyMvSBV5idAjwEElhAnJVPni IFvuk4IKSP3TJ4SH60jEiuYuEKeWzpZ/ypmvt9uKFQKNek7u0lzhfQzjNEHqs60hGEsq hK6e1G5y4i9tryPtFr26VwyWCpeKWrST9Ib9k1n0rMJSVxlWH1XBlGaOT8KLmLTxggmr AOZAFvtj5l+O5iLsNJ7ldj0s//wcRskE7cihB0Kh61VWK+IF5cycCoDwdJjW9iBOzI3J MslYiYMhgEcb11x9Q75NwqL1xkKbViNxDaO3/YBhCC0N4BPotO+DAisTXCSTYkXsATCs lSDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=d4V6KYwTOf22oUxudrUD7wWY8fr5veC2984N+BJ3rmY=; b=fcX11oFZ820Bpjb5ymX0Opw5rXk6Z+kRAW7fRUJQiBJJJi36yKArzsZyKKdQWAEdYN xVt+QGAxXfbiNwURQlt8Qv6hZOAQ1srG5793i3jVAo3lcEZ6O+cFD/hXxK4wjKLXaFcd d5kZdAPIiJMsnzikNsll30t+Phg2h48yYTj8TqWBf0R2NvtMM9bBhYnomYfNkzMtsJWE Src/A1hDUKsFhJKYbms/QMCcWefwF5nddda+mJoSeE3wxh9MoqeFdFuZwBJWXueMYUqT lkjI1nzj1KnnZ+xOupal206rPVRkzB0ewqz1uP8JwdKylB/ASHg2pDXZlr/eCG6Zqlun mWOQ== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si16746704iow.73.2021.04.06.00.08.05; Tue, 06 Apr 2021 00:08:16 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238399AbhDER3l (ORCPT + 99 others); Mon, 5 Apr 2021 13:29:41 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15482 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238299AbhDER3l (ORCPT ); Mon, 5 Apr 2021 13:29:41 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FDczc1x2YzwR1P; Tue, 6 Apr 2021 01:27:24 +0800 (CST) Received: from A190218597.china.huawei.com (10.47.69.183) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Tue, 6 Apr 2021 01:29:23 +0800 From: Salil Mehta To: , CC: , , , , Subject: [PATCH net] net: hns3: Limiting the scope of vector_ring_chain variable Date: Mon, 5 Apr 2021 18:28:25 +0100 Message-ID: <20210405172825.28380-1-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.47.69.183] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Limiting the scope of the variable vector_ring_chain to the block where it is used. Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC") Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index bf4302a5cf95..65752f363f43 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3704,7 +3704,6 @@ static void hns3_nic_set_cpumask(struct hns3_nic_priv *priv) static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv) { - struct hnae3_ring_chain_node vector_ring_chain; struct hnae3_handle *h = priv->ae_handle; struct hns3_enet_tqp_vector *tqp_vector; int ret; @@ -3736,6 +3735,8 @@ static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv) } for (i = 0; i < priv->vector_num; i++) { + struct hnae3_ring_chain_node vector_ring_chain; + tqp_vector = &priv->tqp_vector[i]; tqp_vector->rx_group.total_bytes = 0; -- 2.17.1