From patchwork Wed May 12 14:48:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 435573 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4959831jao; Wed, 12 May 2021 09:00:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiSfW+M/Q6iOUUmtF9czFE/2j/3hf/7p2dtTpI376arwaqdTGRAA813VyFw0MjzJlsfUkH X-Received: by 2002:ac2:52b6:: with SMTP id r22mr6565938lfm.261.1620835205603; Wed, 12 May 2021 09:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835205; cv=none; d=google.com; s=arc-20160816; b=gABvn/chmzFw6LfSkSkIcNyPqcQcoBonXcTt50TtyGgV69MzC1Kn5zo1hO4JPouoLO 0FrtVrdQEvlAoDlu0DhZT1YGjydEC0upbc91MqO/n+awuuUgJVRN4zjKvIX8h/2M8jtG 3syCJ2JWFAi/y5cYczPFgHEeBRQjV74EPAMkiUATlCnEwxyK+qRMhUFWCdp0NtLvBpN2 6k4oA2+Kliy8Vx7coNssOw/xqRpdGgWxgmsQvty0jB7aX4Rmzl9bk3hBB0fDJgOMxr1d 6LDa/jPgJ4h9c496DT3Atc54NpXOum0baT1B3zjW3GAyWyVuLLlrsHuPPQJPWoJXdbOO fjgQ== 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=HJbns9d0rlDIA2V2JjYzpiN5MYWoFrhJRfh1sNV47nAO/IFnmFEY9AnjkMrKYu/2zZ SE/Ly1hHGFfZWEGzdD57YwwYn6RpTv3uDMRrAHtJVLBFODbMzGF7/o5Zesay6FQpnaCk VLstckdikaLyvSKxftX1dx3NggDW1iev8/tYxj5XneKUuRUoEYIvVtqqy0pra4Pd0UTL dVeEK6hvs3ouWGTOZRnOT2z5ToD825a3coBo45g4Ns5SlJ1AlijF2SSSLvM0bnTmfihM Hjw6D1yFU7JseewooeIsI8Mx7Y+1yBctatwAMJGx7TFXhfzePsFcFCgfaL97OvDXId31 Hy2g== 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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 m20si100438lji.284.2021.05.12.09.00.05; Wed, 12 May 2021 09:00:05 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S233398AbhELPlU (ORCPT + 12 others); Wed, 12 May 2021 11:41:20 -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 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.30.2 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;