提交 b8df524e 编写于 作者: S Salil Mehta 提交者: Zheng Zengkai

net: hns3: Limiting the scope of vector_ring_chain variable

stable inclusion
from stable-5.10.37
commit 3cf9fac71b7903065719d4743772d6302367b6fe
bugzilla: 51868
CVE: NA

--------------------------------

[ Upstream commit d392ecd1 ]

Limiting the scope of the variable vector_ring_chain to the block where it
is used.

Fixes: 424eb834 ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC")
Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 daf94e42
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册