From patchwork Wed May 12 14:49:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 435547 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4912289jao; Wed, 12 May 2021 08:05:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ/c/rr0n/HUxk8Mk5XVVl4IAfxxiJ91UxVYAPi2XdRYpbPv5yabhsa7lU8Ki2DnQ3RFk0 X-Received: by 2002:a17:906:724b:: with SMTP id n11mr38360552ejk.338.1620831929618; Wed, 12 May 2021 08:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620831929; cv=none; d=google.com; s=arc-20160816; b=CUCGVTfNKL9P6yNmpgWgbmli7HBjmvjNCBdAklKjcFl9myaVHmS76fDv9j4/ISvQ/r T8suW3J5gHmZntOVTwTLVFQDBhK4JaLcASR8PKMwb0Zb0EIYP597HlB51idSNtm/Co/w +DG4abAi/Dvf6PiO8DMH8yFptb6Mj1rHL/Np5G13IRjl9ncYVkq4pXHtGS/R6lrHXzbS 5+Wm05HJlAjPFxzHtYFwd5xQW4FwZ9oEXN1WDfrlO0zFFnGKL9QQfE7XaeKd4WAka6Q5 +GPbvaOAFSkRJu+TFpTwKf27z/33BwmL1e/HUSjKFazlTeTAN+VSSTBQhwf0a4J/qGw5 ZpMQ== 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=BzRLg2egWCvbBueT9RKIW8Q7qDVwIPYUZGM8Xcp/ajw=; b=r7XHvsteqclcVCP4kPpIwrKf1qcY0Qphr6+3iTNa47VNTzYqxHzeFso9NL9OPFqdxE O4hdJrp7OswPJlkeIhl5Z7nbLLCS7xDoy1GYGMOZAWM8kWd+4qGO6sojokzmMaWr50YW o7xFd7/Ylf3jxmfNvrSw1+zhhU8NcKh3S8PsUxqEqR2hsk6VYcLpcIx0RMrUlUjpaSDu j4zb4ckb7iOt4BNER2Elm1rs+aOzk/O7LA43W6RAc0c3F+j6vh6w11sEZHCbQG5VplN2 HmESuB/24ytWpD16c2+zN4ycP4jp5vndZpczGwIFowsmvti7d99DLNZzICKpzhuJbnWO TK8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cAT3PAqb; 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 v21si17365676edx.267.2021.05.12.08.05.27; Wed, 12 May 2021 08:05:29 -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=cAT3PAqb; 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 S231405AbhELPGX (ORCPT + 12 others); Wed, 12 May 2021 11:06:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:57002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233277AbhELPFB (ORCPT ); Wed, 12 May 2021 11:05:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CE7616144A; Wed, 12 May 2021 14:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620831589; bh=H/4iCyad6FMeGEPoDhsDNi6JdUKUScq6ox8GfFcmOAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cAT3PAqbbO19hmd+lbydZ/QfH293b17AE9xMYPi4bBHlalH4K3uXQXn6t6yxXb7TC keYxAQcuo0AN9I8CZ/p5yok0khHvd2ZEmRu6gu9JEJB5h10/7sCZo4FKf/H575hvQE sXjr3paeXeywRhaOQQlWEOzfb52Jmgb6Da3H0WnI= 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.4 180/244] net: hns3: Limiting the scope of vector_ring_chain variable Date: Wed, 12 May 2021 16:49:11 +0200 Message-Id: <20210512144748.755420132@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144743.039977287@linuxfoundation.org> References: <20210512144743.039977287@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 92af7204711c..696f21543aa7 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3322,7 +3322,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 = 0; @@ -3354,6 +3353,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;