[4/5] net/hns3: fix variable overflow

Message ID 20240403101624.2771140-5-haijie1@huawei.com (mailing list archive)
State Accepted
Delegated to: Ferruh Yigit
Headers
Series net/hns3: add some bugfix |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Jie Hai April 3, 2024, 10:16 a.m. UTC
  From: Dengdui Huang <huangdengdui@huawei.com>

the function strtoul() returns an unsigned long, which should
be received using the variable uint64_t.

Fixes: 2fc3e696a7f1 ("net/hns3: add runtime config for mailbox limit time")
Cc: stable@dpdk.org

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 28c26b049cf9..5e6cdfdaa019 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -224,7 +224,7 @@  hns3_parse_dev_caps_mask(const char *key, const char *value, void *extra_args)
 static int
 hns3_parse_mbx_time_limit(const char *key, const char *value, void *extra_args)
 {
-	uint32_t val;
+	uint64_t val;
 
 	RTE_SET_USED(key);