diff mbox series

[2/8] net/hns3: delete unnecessary zero assignments

Message ID 1626487376-30038-3-git-send-email-humin29@huawei.com (mailing list archive)
State Accepted, archived
Headers show
Series bugfix for hns3 PMD | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

humin (Q) July 17, 2021, 2:02 a.m. UTC
From: Chengwen Feng <fengchengwen@huawei.com>

The output parameter 'cap' was cleared at the function entry, the
latter zero assignment 'cap' fields was unnecessary, so delete them.

Fixes: c09c7847d892 ("net/hns3: support traffic management")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_tm.c | 18 ------------------
 1 file changed, 18 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/hns3/hns3_tm.c b/drivers/net/hns3/hns3_tm.c
index 7fd9818..db5ac78 100644
--- a/drivers/net/hns3/hns3_tm.c
+++ b/drivers/net/hns3/hns3_tm.c
@@ -134,33 +134,15 @@  hns3_tm_capabilities_get(struct rte_eth_dev *dev,
 	cap->leaf_nodes_identical = 1;
 	cap->shaper_n_max = 1 + HNS3_MAX_TC_NUM;
 	cap->shaper_private_n_max = 1 + HNS3_MAX_TC_NUM;
-	cap->shaper_private_dual_rate_n_max = 0;
-	cap->shaper_private_rate_min = 0;
 	cap->shaper_private_rate_max =
 		hns3_tm_rate_convert_firmware2tm(hw->max_tm_rate);
-	cap->shaper_shared_n_max = 0;
-	cap->shaper_shared_n_nodes_per_shaper_max = 0;
-	cap->shaper_shared_n_shapers_per_node_max = 0;
-	cap->shaper_shared_dual_rate_n_max = 0;
-	cap->shaper_shared_rate_min = 0;
-	cap->shaper_shared_rate_max = 0;
 
 	cap->sched_n_children_max = max_tx_queues;
 	cap->sched_sp_n_priorities_max = 1;
-	cap->sched_wfq_n_children_per_group_max = 0;
-	cap->sched_wfq_n_groups_max = 0;
 	cap->sched_wfq_weight_max = 1;
 
-	cap->cman_head_drop_supported = 0;
-	cap->dynamic_update_mask = 0;
 	cap->shaper_pkt_length_adjust_min = RTE_TM_ETH_FRAMING_OVERHEAD;
 	cap->shaper_pkt_length_adjust_max = RTE_TM_ETH_FRAMING_OVERHEAD_FCS;
-	cap->cman_wred_context_n_max = 0;
-	cap->cman_wred_context_private_n_max = 0;
-	cap->cman_wred_context_shared_n_max = 0;
-	cap->cman_wred_context_shared_n_nodes_per_context_max = 0;
-	cap->cman_wred_context_shared_n_contexts_per_node_max = 0;
-	cap->stats_mask = 0;
 
 	return 0;
 }