[PATCH v1 34/42] net/e1000/base: fix iterator type
Anatoly Burakov
anatoly.burakov at intel.com
Fri Jan 31 13:58:47 CET 2025
From: Amir Avivi <amir.avivi at intel.com>
Fix static analysis warning about comparison between types of
incompatible width, which might lead to an infinite loop due to overflow.
Fixes: af75078fece3 ("first public release")
Cc: stable at dpdk.org
Signed-off-by: Amir Avivi <amir.avivi at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
drivers/net/intel/e1000/base/e1000_phy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/e1000/base/e1000_phy.c b/drivers/net/intel/e1000/base/e1000_phy.c
index e9df7ec873..1fc7eb375e 100644
--- a/drivers/net/intel/e1000/base/e1000_phy.c
+++ b/drivers/net/intel/e1000/base/e1000_phy.c
@@ -2442,7 +2442,8 @@ s32 e1000_phy_has_link_generic(struct e1000_hw *hw, u32 iterations,
u32 usec_interval, bool *success)
{
s32 ret_val = E1000_SUCCESS;
- u16 i, phy_status;
+ u16 phy_status;
+ u32 i;
DEBUGFUNC("e1000_phy_has_link_generic");
--
2.43.5
More information about the dev
mailing list