41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
From 1494a9e8d7b461301476be05a6b9cbc170b4d51d Mon Sep 17 00:00:00 2001
|
||
From: =?UTF-8?q?=E5=BC=A0=E6=A5=9A=E5=90=9B?=
|
||
<zhangchujun@cmss.chinamobile.com>
|
||
Date: Fri, 11 Oct 2024 14:56:06 +0800
|
||
Subject: [PATCH] remove the unused return variable.
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
因为kni_config_network_interface函数始终返回0,此提交移除了‘ret’变量,化简了函数的返回逻辑
|
||
|
||
Signed-off-by:zhangchujun <zhangchujun@cmss.chinamobile.com>
|
||
---
|
||
src/common/dpdk_common.c | 3 +--
|
||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||
|
||
diff --git a/src/common/dpdk_common.c b/src/common/dpdk_common.c
|
||
index 66ad529..fafd266 100644
|
||
--- a/src/common/dpdk_common.c
|
||
+++ b/src/common/dpdk_common.c
|
||
@@ -55,7 +55,6 @@ struct rte_kni* get_gazelle_kni(void)
|
||
|
||
static int32_t kni_config_network_interface(uint16_t port_id, uint8_t if_up)
|
||
{
|
||
- int32_t ret = 0;
|
||
static bool g_bond_dev_started = false;
|
||
|
||
if (port_id >= rte_eth_dev_count_avail() || port_id >= GAZELLE_MAX_ETHPORTS) {
|
||
@@ -82,7 +81,7 @@ static int32_t kni_config_network_interface(uint16_t port_id, uint8_t if_up)
|
||
}
|
||
|
||
COMMON_INFO("Configure network interface of %hu %s \n", port_id, if_up ? "up" : "down");
|
||
- return ret;
|
||
+ return 0;
|
||
}
|
||
|
||
int32_t dpdk_kni_init(uint16_t port, struct rte_mempool *pool)
|
||
--
|
||
2.33.0
|
||
|