git: 2a70b66f8983 - stable/13 - sis_attach: Move waittime definition into for loop

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sun, 02 Oct 2022 04:29:42 UTC
The branch stable/13 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=2a70b66f8983482e9d7577542436da58617b033e

commit 2a70b66f8983482e9d7577542436da58617b033e
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-07-08 17:53:31 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-10-02 04:25:54 +0000

    sis_attach: Move waittime definition into for loop
    
    Sponsored by:           Netflix
    
    (cherry picked from commit c9439e23cefb918ad71f568a35f2a468ef3365c8)
---
 sys/dev/sis/if_sis.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c
index bb06b4a1f459..30d71ea60079 100644
--- a/sys/dev/sis/if_sis.c
+++ b/sys/dev/sis/if_sis.c
@@ -900,9 +900,8 @@ sis_attach(device_t dev)
 	u_char			eaddr[ETHER_ADDR_LEN];
 	struct sis_softc	*sc;
 	struct ifnet		*ifp;
-	int			error = 0, pmc, waittime = 0;
+	int			error = 0, pmc;
 
-	waittime = 0;
 	sc = device_get_softc(dev);
 
 	sc->sis_dev = dev;
@@ -1028,7 +1027,7 @@ sis_attach(device_t dev)
 			 * time we access it, we need to set SIS_EECMD_REQ.
 			 */
 			SIO_SET(SIS_EECMD_REQ);
-			for (waittime = 0; waittime < SIS_TIMEOUT;
+			for (int waittime = 0; waittime < SIS_TIMEOUT;
 			    waittime++) {
 				/* Force EEPROM to idle state. */
 				sis_eeprom_idle(sc);