From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8107A0C4A; Sat, 17 Jul 2021 04:04:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A2904139A; Sat, 17 Jul 2021 04:03:53 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 121D140E50 for ; Sat, 17 Jul 2021 04:03:46 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4GRWTk4nFmz1CK8x for ; Sat, 17 Jul 2021 09:58:02 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sat, 17 Jul 2021 10:03:43 +0800 From: "Min Hu (Connor)" To: CC: , Date: Sat, 17 Jul 2021 10:02:50 +0800 Message-ID: <1626487376-30038-3-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626487376-30038-1-git-send-email-humin29@huawei.com> References: <1626487376-30038-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 2/8] net/hns3: delete unnecessary zero assignments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng 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 Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_tm.c | 18 ------------------ 1 file changed, 18 deletions(-) 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; } -- 2.7.4