Module Name: src Committed By: martin Date: Sat Feb 22 12:08:10 UTC 2025
Modified Files: src/sys/dev/pci [netbsd-10]: if_gem_pci.c Log Message: Pull up following revision(s) (requested by joe in ticket #1054): sys/dev/pci/if_gem_pci.c: revision 1.54 sys/dev/pci/if_gem_pci.c: revision 1.55 use the right buffer size for shared pin check and debug avoid the use of sizeof(pointer) and use the Temp BUF limit. Use "int" format for constant "GEM_TMP_BUFSIZE - 1". Kernel ALL/amd64 builds again. To generate a diff of this commit: cvs rdiff -u -r1.52.20.1 -r1.52.20.2 src/sys/dev/pci/if_gem_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_gem_pci.c diff -u src/sys/dev/pci/if_gem_pci.c:1.52.20.1 src/sys/dev/pci/if_gem_pci.c:1.52.20.2 --- src/sys/dev/pci/if_gem_pci.c:1.52.20.1 Sat Feb 22 12:04:11 2025 +++ src/sys/dev/pci/if_gem_pci.c Sat Feb 22 12:08:10 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gem_pci.c,v 1.52.20.1 2025/02/22 12:04:11 martin Exp $ */ +/* $NetBSD: if_gem_pci.c,v 1.52.20.2 2025/02/22 12:08:10 martin Exp $ */ /* * @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.52.20.1 2025/02/22 12:04:11 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.52.20.2 2025/02/22 12:08:10 martin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -268,7 +268,7 @@ gem_pci_attach(device_t parent, device_t /* Check for "shared-pins = serdes" in FCode. */ i = 0; serdes = 0; - while (i < (sizeof buf) - sizeof "serdes") { + while (i < GEM_TMP_BUFSIZE - sizeof "serdes") { if (!serdes) { if (isserdes(&buf[i])) serdes = 1; @@ -284,12 +284,12 @@ gem_pci_attach(device_t parent, device_t } #ifdef GEM_DEBUG /* PROM dump */ - printf("%s: PROM dump (0x0000 to %04zx)\n", - device_xname(sc->sc_dev), (sizeof buf) - 1); + printf("%s: PROM dump (0x0000 to %04x)\n", + device_xname(sc->sc_dev), GEM_TMP_BUFSIZE - 1); i = 0; j = 0; printf(" %04x ", i); - while (i < sizeof buf) { + while (i < GEM_TMP_BUFSIZE ) { printf("%02x ", buf[i]); if (i && !(i % 8)) printf(" ");