From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Qin Ke <qin.ke@corigine.com>,
james.hershaw@corigine.com, stable@dpdk.org,
Chaoyong He <chaoyong.he@corigine.com>,
Long Wu <long.wu@corigine.com>,
Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH 1/8] net/nfp: fix incorrect type declaration of some variables
Date: Thu, 5 Sep 2024 14:25:04 +0800 [thread overview]
Message-ID: <20240905062511.2710102-2-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20240905062511.2710102-1-chaoyong.he@corigine.com>
From: Qin Ke <qin.ke@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@corigine.com
Cc: stable@dpdk.org
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@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
next parent reply other threads:[~2024-09-05 6:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240905062511.2710102-1-chaoyong.he@corigine.com>
2024-09-05 6:25 ` Chaoyong He [this message]
2024-09-05 6:25 ` [PATCH 6/8] net/nfp: fix representor port link speed update problem Chaoyong He
2024-09-05 6:25 ` [PATCH 8/8] net/nfp: fix representor port link status " Chaoyong He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240905062511.2710102-2-chaoyong.he@corigine.com \
--to=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=james.hershaw@corigine.com \
--cc=long.wu@corigine.com \
--cc=oss-drivers@corigine.com \
--cc=peng.zhang@corigine.com \
--cc=qin.ke@corigine.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).