Skip to content

Commit

Permalink
net: hns3: Limiting the scope of vector_ring_chain variable
Browse files Browse the repository at this point in the history
Limiting the scope of the variable vector_ring_chain to the block where it
is used.

Fixes: 424eb83 ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC")
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Salil Mehta authored and David S. Miller committed Apr 5, 2021
1 parent eeb85a1 commit d392ecd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -3747,7 +3747,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;
Expand Down Expand Up @@ -3779,6 +3778,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;
Expand Down

0 comments on commit d392ecd

Please sign in to comment.