[PATCH 1/8] net/nfp: fix incorrect type declaration of some variables
Chaoyong He
chaoyong.he at corigine.com
Thu Sep 5 08:25:04 CEST 2024
From: Qin Ke <qin.ke at corigine.com>
The type declaration of variable 'speed' and 'i' in
'nfp_net_link_speed_rte2nfp()' is not correct, fix it.
Fixes: 36a9abd4b679 ("net/nfp: write link speed to control BAR")
Cc: james.hershaw at corigine.com
Cc: stable at dpdk.org
Signed-off-by: Qin Ke <qin.ke at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
drivers/net/nfp/nfp_net_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index 5f92c2c31d..be0b6dc0cf 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -157,10 +157,10 @@ static const uint32_t nfp_net_link_speed_nfp2rte[] = {
[NFP_NET_CFG_STS_LINK_RATE_100G] = RTE_ETH_SPEED_NUM_100G,
};
-static uint16_t
-nfp_net_link_speed_rte2nfp(uint16_t speed)
+static size_t
+nfp_net_link_speed_rte2nfp(uint32_t speed)
{
- uint16_t i;
+ size_t i;
for (i = 0; i < RTE_DIM(nfp_net_link_speed_nfp2rte); i++) {
if (speed == nfp_net_link_speed_nfp2rte[i])
--
2.39.1
More information about the dev
mailing list