git: 15a0db2101cd - main - e1000: fix iterator type

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Tue, 11 Aug 2026 18:48:16 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=15a0db2101cd67eccd0be2ddf1ad18be1ea5afd0

commit 15a0db2101cd67eccd0be2ddf1ad18be1ea5afd0
Author:     Amir Avivi <amir.avivi@intel.com>
AuthorDate: 2025-02-06 16:08:39 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-11 18:47:57 +0000

    e1000: fix iterator type
    
    DPDK commit message
    
    net/e1000/base: fix iterator type
    
    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@dpdk.org
    
    Signed-off-by: Amir Avivi <amir.avivi@intel.com>
    Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
    Acked-by: Bruce Richardson <bruce.richardson@intel.com>
    
    Obtained from:  DPDK (3d36053991)
    MFC after:      2 weeks
---
 sys/dev/e1000/e1000_phy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c
index 634f48171c3e..5fec60e797b3 100644
--- a/sys/dev/e1000/e1000_phy.c
+++ b/sys/dev/e1000/e1000_phy.c
@@ -2360,7 +2360,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");