Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4618726pxj; Wed, 12 May 2021 09:21:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6TOaNWuwnUSxKkNOfpGknTLBvlSSbCC2HyjBW1twGycbpLFIIIMUPdA4Bqbtoy3EdR1jv X-Received: by 2002:a17:906:b794:: with SMTP id dt20mr5094892ejb.59.1620836488642; Wed, 12 May 2021 09:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836488; cv=none; d=google.com; s=arc-20160816; b=zBaBb7TmkNKTzlXxqQCBwKvj97qc6O3yQtJ24huL+U/DQm2y2q9w/V3xVJ7snor/5N IUrVZkzBubMSXCK/3/jk7jyg7s06JQ83FJGT6m7mVZxqusKniGU7tVLQiQwAEWtyy2lv alHaGuJP+hrCCOI16r79erosFUEohI56hUZyyeb0H+XTX2EqLm0l63TYfFKCDKRuFmNb Kenqyvt5/NJiZUSOdstGLg4uuEtHspSsawaBsPP2urtu7lELchxr8V7DvsDUri3uyjyO pAKFyz35hRfcspjMaDdqzgdnQHTMqyBnQFUaHgzAhrz2Kr/3ERpp8cKuM7c5IA/R2XUD nYoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2YhNgB4P1iNtKu6gPARBgsAeeyvsJa6UuwDqe9qnVp0=; b=kQfh7SNPOVs3DSIw0AuTj6A6WG675JmxdUvDrDdwkLtdjuSbbd57zDLJsSLMnY+/gF 8AXap4d1M2EmXSWjmzwrq92uP5ttufYmKXPzxsQ20rnyK9My5GMI0I7EzrFt2SlFwT6B dbRzDAydVlCj5xqamx7Ag7LPW6XzoTRvwXJ/K+9+9ZxoYScOKR7UXZ6HMpD/pgTnoMiH pNxsngyXezxEK/Md7lv1/G8EimUpraPhPALpO29govBwNRnM+HD7e8QsBOen7v/gaUun yz5/y6+rU0T49s4QuLCyffKe9DknAsXeaet8sGFM5n9Xu2JZfkeTJ99w4RKVv1qt4ly8 eOzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AofRuVOT; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si113839edw.601.2021.05.12.09.21.04; Wed, 12 May 2021 09:21:28 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AofRuVOT; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236281AbhELQVD (ORCPT + 99 others); Wed, 12 May 2021 12:21:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:56528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236082AbhELPg7 (ORCPT ); Wed, 12 May 2021 11:36:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2648D6143E; Wed, 12 May 2021 15:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832697; bh=LqY23mqsAFpIvQnrCLo5cQvDh4VvIBBAw2GlXQxu0M8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AofRuVOTHczr+fj2eqZhXNZyvsSnGDG2e/KziLhbctbfrGo+Rbecz6PLpMCD+/j9Q d9KnEoDJt5fFq3XT5TrCGvOYu4v8iwki9VWQLoUuD8ctmjt3ShCTSvJWdDA1AxBNKg OTl2dXIMCluMtfcB8IVeh4yuhz4r9NH9e2jEoNsI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 386/530] net: hns3: Limiting the scope of vector_ring_chain variable Date: Wed, 12 May 2021 16:48:16 +0200 Message-Id: <20210512144832.459723775@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Salil Mehta [ Upstream commit d392ecd1bc29ae15b0e284d5f732c2d36f244271 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 a362516a3185..070bef303d18 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3526,7 +3526,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; @@ -3558,6 +3557,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.30.2