CVS commit: src/external/gpl3/binutils
Module Name:src Committed By: mrg Date: Mon Dec 6 08:13:48 UTC 2021 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/aarch64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/aarch64eb: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/alpha: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/hppa: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/i386: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/ia64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/m68000: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/m68k: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/mips64eb: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/mips64el: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/mipseb: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/mipsel: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/powerpc: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/powerpc64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/riscv32: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/riscv64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/sh3eb: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/sh3el: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/sparc: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/sparc64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/vax: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/x86_64: bfd_stdint.h src/external/gpl3/binutils/usr.bin/common/arch/aarch64: config.h src/external/gpl3/binutils/usr.bin/common/arch/ia64: config.h src/external/gpl3/binutils/usr.bin/common/arch/mips64eb: config.h src/external/gpl3/binutils/usr.bin/common/arch/mips64el: config.h src/external/gpl3/binutils/usr.bin/common/arch/mipseb: config.h src/external/gpl3/binutils/usr.bin/common/arch/mipsel: config.h src/external/gpl3/binutils/usr.bin/common/arch/mipsn64el: config.h src/external/gpl3/binutils/usr.bin/common/arch/sh3el: config.h src/external/gpl3/binutils/usr.bin/gas/arch/mipsn64el: config.h src/external/gpl3/binutils/usr.bin/ld/arch/aarch64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/alpha: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/hppa: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/i386: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/ia64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/m68000: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/m68k: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mips64eb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mips64el: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mipseb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mipsel: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mipsn64eb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mipsn64el: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/powerpc: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/powerpc64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/riscv32: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/riscv64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/sh3eb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/sh3el: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/sparc: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/sparc64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/vax: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/x86_64: config.h defs.mk Log Message: mknative-binutils for all targets. fixes 'const' vs 'iconv', yytext pointer, and initfini. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd_stdint.h cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd_stdint.h cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd_stdint.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd_stdint.h cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd_stdint.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd_stdint.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd_stdint.h cvs rdiff -u -r1.7 -r1.8 \ s
CVS commit: src/external/gpl3/binutils
Module Name:src Committed By: mrg Date: Mon Dec 6 08:13:48 UTC 2021 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/aarch64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/aarch64eb: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/alpha: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/hppa: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/i386: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/ia64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/m68000: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/m68k: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/mips64eb: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/mips64el: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/mipseb: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/mipsel: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/powerpc: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/powerpc64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/riscv32: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/riscv64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/sh3eb: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/sh3el: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/sparc: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/sparc64: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/vax: bfd_stdint.h src/external/gpl3/binutils/lib/libbfd/arch/x86_64: bfd_stdint.h src/external/gpl3/binutils/usr.bin/common/arch/aarch64: config.h src/external/gpl3/binutils/usr.bin/common/arch/ia64: config.h src/external/gpl3/binutils/usr.bin/common/arch/mips64eb: config.h src/external/gpl3/binutils/usr.bin/common/arch/mips64el: config.h src/external/gpl3/binutils/usr.bin/common/arch/mipseb: config.h src/external/gpl3/binutils/usr.bin/common/arch/mipsel: config.h src/external/gpl3/binutils/usr.bin/common/arch/mipsn64el: config.h src/external/gpl3/binutils/usr.bin/common/arch/sh3el: config.h src/external/gpl3/binutils/usr.bin/gas/arch/mipsn64el: config.h src/external/gpl3/binutils/usr.bin/ld/arch/aarch64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/aarch64eb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/alpha: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/hppa: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/i386: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/ia64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/m68000: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/m68k: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mips64eb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mips64el: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mipseb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mipsel: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mipsn64eb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/mipsn64el: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/powerpc: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/powerpc64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/riscv32: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/riscv64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/sh3eb: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/sh3el: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/sparc: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/sparc64: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/vax: config.h defs.mk src/external/gpl3/binutils/usr.bin/ld/arch/x86_64: config.h defs.mk Log Message: mknative-binutils for all targets. fixes 'const' vs 'iconv', yytext pointer, and initfini. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd_stdint.h cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/binutils/lib/libbfd/arch/aarch64eb/bfd_stdint.h cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils/lib/libbfd/arch/alpha/bfd_stdint.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/binutils/lib/libbfd/arch/hppa/bfd_stdint.h cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils/lib/libbfd/arch/i386/bfd_stdint.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/ia64/bfd_stdint.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/binutils/lib/libbfd/arch/m68000/bfd_stdint.h cvs rdiff -u -r1.7 -r1.8 \ s
CVS commit: src/sys/dev/tc
Module Name:src Committed By: abs Date: Mon Dec 6 16:00:07 UTC 2021 Modified Files: src/sys/dev/tc: cfb.c mfb.c sfb.c tfb.c xcfb.c Log Message: Add WSDISPLAYIO_GET_FBINFO support to most TURBOchannel framebuffers This adds WSDISPLAYIO_GET_FBINFO to cfb, mfb, sfb, tfb and xcfb TURBOchannel framebuffers as used by pmax and alpha It does not add support to px and pxg (they handle ioctls in common code in stic.c and more careful wiring is required) These changes allow an Xswfb X server to use the framebuffer directly, albeit without any special acceleration A subsequent change will re-enable X server building on pmax, and also hopefully switch alpha from Xorg 1.10 to 1.20 To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/dev/tc/cfb.c src/sys/dev/tc/tfb.c cvs rdiff -u -r1.63 -r1.64 src/sys/dev/tc/mfb.c cvs rdiff -u -r1.88 -r1.89 src/sys/dev/tc/sfb.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/tc/xcfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/tc
Module Name:src Committed By: abs Date: Mon Dec 6 16:00:07 UTC 2021 Modified Files: src/sys/dev/tc: cfb.c mfb.c sfb.c tfb.c xcfb.c Log Message: Add WSDISPLAYIO_GET_FBINFO support to most TURBOchannel framebuffers This adds WSDISPLAYIO_GET_FBINFO to cfb, mfb, sfb, tfb and xcfb TURBOchannel framebuffers as used by pmax and alpha It does not add support to px and pxg (they handle ioctls in common code in stic.c and more careful wiring is required) These changes allow an Xswfb X server to use the framebuffer directly, albeit without any special acceleration A subsequent change will re-enable X server building on pmax, and also hopefully switch alpha from Xorg 1.10 to 1.20 To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/dev/tc/cfb.c src/sys/dev/tc/tfb.c cvs rdiff -u -r1.63 -r1.64 src/sys/dev/tc/mfb.c cvs rdiff -u -r1.88 -r1.89 src/sys/dev/tc/sfb.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/tc/xcfb.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/tc/cfb.c diff -u src/sys/dev/tc/cfb.c:1.65 src/sys/dev/tc/cfb.c:1.66 --- src/sys/dev/tc/cfb.c:1.65 Sat Aug 7 16:19:16 2021 +++ src/sys/dev/tc/cfb.c Mon Dec 6 16:00:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cfb.c,v 1.65 2021/08/07 16:19:16 thorpej Exp $ */ +/* $NetBSD: cfb.c,v 1.66 2021/12/06 16:00:07 abs Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.65 2021/08/07 16:19:16 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.66 2021/12/06 16:00:07 abs Exp $"); #include #include @@ -363,6 +363,11 @@ cfbioctl(void *v, void *vs, u_long cmd, *(u_int *)data = WSDISPLAY_TYPE_CFB; return (0); + case WSDISPLAYIO_GET_FBINFO: { + struct wsdisplayio_fbinfo *fbi = data; + return wsdisplayio_get_fbinfo(sc->sc_ri, fbi); + } + case WSDISPLAYIO_GINFO: #define wsd_fbip ((struct wsdisplay_fbinfo *)data) wsd_fbip->height = ri->ri_height; Index: src/sys/dev/tc/tfb.c diff -u src/sys/dev/tc/tfb.c:1.65 src/sys/dev/tc/tfb.c:1.66 --- src/sys/dev/tc/tfb.c:1.65 Sat Aug 7 16:19:16 2021 +++ src/sys/dev/tc/tfb.c Mon Dec 6 16:00:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tfb.c,v 1.65 2021/08/07 16:19:16 thorpej Exp $ */ +/* $NetBSD: tfb.c,v 1.66 2021/12/06 16:00:07 abs Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.65 2021/08/07 16:19:16 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.66 2021/12/06 16:00:07 abs Exp $"); #include #include @@ -397,6 +397,11 @@ tfbioctl(void *v, void *vs, u_long cmd, *(u_int *)data = WSDISPLAY_TYPE_TX; return (0); + case WSDISPLAYIO_GET_FBINFO: { + struct wsdisplayio_fbinfo *fbi = data; + return wsdisplayio_get_fbinfo(sc->sc_ri, fbi); + } + case WSDISPLAYIO_GINFO: #define wsd_fbip ((struct wsdisplay_fbinfo *)data) wsd_fbip->height = ri->ri_height; Index: src/sys/dev/tc/mfb.c diff -u src/sys/dev/tc/mfb.c:1.63 src/sys/dev/tc/mfb.c:1.64 --- src/sys/dev/tc/mfb.c:1.63 Sat Aug 7 16:19:16 2021 +++ src/sys/dev/tc/mfb.c Mon Dec 6 16:00:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mfb.c,v 1.63 2021/08/07 16:19:16 thorpej Exp $ */ +/* $NetBSD: mfb.c,v 1.64 2021/12/06 16:00:07 abs Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.63 2021/08/07 16:19:16 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.64 2021/12/06 16:00:07 abs Exp $"); #include #include @@ -327,6 +327,11 @@ mfbioctl(void *v, void *vs, u_long cmd, *(u_int *)data = WSDISPLAY_TYPE_MFB; return (0); + case WSDISPLAYIO_GET_FBINFO: { + struct wsdisplayio_fbinfo *fbi = data; + return wsdisplayio_get_fbinfo(sc->sc_ri, fbi); + } + case WSDISPLAYIO_GINFO: #define wsd_fbip ((struct wsdisplay_fbinfo *)data) wsd_fbip->height = ri->ri_height; Index: src/sys/dev/tc/sfb.c diff -u src/sys/dev/tc/sfb.c:1.88 src/sys/dev/tc/sfb.c:1.89 --- src/sys/dev/tc/sfb.c:1.88 Sat Aug 7 16:19:16 2021 +++ src/sys/dev/tc/sfb.c Mon Dec 6 16:00:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sfb.c,v 1.88 2021/08/07 16:19:16 thorpej Exp $ */ +/* $NetBSD: sfb.c,v 1.89 2021/12/06 16:00:07 abs Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.88 2021/08/07 16:19:16 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.89 2021/12/06 16:00:07 abs Exp $"); #include #include @@ -397,6 +397,11 @@ sfbioctl(void *v, void *vs, u_long cmd, *(u_int *)data = WSDISPLAY_TYPE_SFB; return (0); + case WSDISPLAYIO_GET_FBINFO: { + struct wsdisplayio_fbinfo *fbi = data; + return wsdisplayio_get_fbinfo(sc->sc_ri, fbi); + } + case WSDISPLAYIO_GINFO: #define wsd_fbip ((struct wsdisplay_fbinfo *)data) wsd_fbip->height = ri->ri_height; Index: src/s
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: msaitoh Date: Mon Dec 6 16:24:57 UTC 2021 Modified Files: src/sys/dev/i2c: spdmem_i2c.c Log Message: Check the return value correctly. Pointed out by pgoyette@. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/i2c/spdmem_i2c.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/i2c/spdmem_i2c.c diff -u src/sys/dev/i2c/spdmem_i2c.c:1.24 src/sys/dev/i2c/spdmem_i2c.c:1.25 --- src/sys/dev/i2c/spdmem_i2c.c:1.24 Mon Dec 6 04:25:36 2021 +++ src/sys/dev/i2c/spdmem_i2c.c Mon Dec 6 16:24:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: spdmem_i2c.c,v 1.24 2021/12/06 04:25:36 msaitoh Exp $ */ +/* $NetBSD: spdmem_i2c.c,v 1.25 2021/12/06 16:24:57 msaitoh Exp $ */ /* * Copyright (c) 2007 Nicolas Joly @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.24 2021/12/06 04:25:36 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.25 2021/12/06 16:24:57 msaitoh Exp $"); #include #include @@ -121,7 +121,7 @@ spdmem_reset_page(struct spdmem_i2c_soft goto error; reg = 2; - rv |= iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, 1, + rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, 1, &byte2, 1, 0); if (rv != 0) goto error;
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: msaitoh Date: Mon Dec 6 16:24:57 UTC 2021 Modified Files: src/sys/dev/i2c: spdmem_i2c.c Log Message: Check the return value correctly. Pointed out by pgoyette@. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/i2c/spdmem_i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/tc
Module Name:src Committed By: abs Date: Mon Dec 6 17:43:50 UTC 2021 Modified Files: src/sys/dev/tc: sfbplus.c Log Message: Add WSDISPLAYIO_GET_FBINFO support to sfbplus TURBOchannel framebuffer Missed in previous change to cfb, mfb, sfb, tfb and xcfb To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/tc/sfbplus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/tc
Module Name:src Committed By: abs Date: Mon Dec 6 17:43:50 UTC 2021 Modified Files: src/sys/dev/tc: sfbplus.c Log Message: Add WSDISPLAYIO_GET_FBINFO support to sfbplus TURBOchannel framebuffer Missed in previous change to cfb, mfb, sfb, tfb and xcfb To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/tc/sfbplus.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/tc/sfbplus.c diff -u src/sys/dev/tc/sfbplus.c:1.41 src/sys/dev/tc/sfbplus.c:1.42 --- src/sys/dev/tc/sfbplus.c:1.41 Sat Aug 7 16:19:16 2021 +++ src/sys/dev/tc/sfbplus.c Mon Dec 6 17:43:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sfbplus.c,v 1.41 2021/08/07 16:19:16 thorpej Exp $ */ +/* $NetBSD: sfbplus.c,v 1.42 2021/12/06 17:43:50 abs Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.41 2021/08/07 16:19:16 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.42 2021/12/06 17:43:50 abs Exp $"); #include #include @@ -431,6 +431,11 @@ sfbioctl(void *v, void *vs, u_long cmd, *(u_int *)data = WSDISPLAY_TYPE_SFBP; return (0); + case WSDISPLAYIO_GET_FBINFO: { + struct wsdisplayio_fbinfo *fbi = data; + return wsdisplayio_get_fbinfo(sc->sc_ri, fbi); + } + case WSDISPLAYIO_GINFO: #define wsd_fbip ((struct wsdisplay_fbinfo *)data) wsd_fbip->height = ri->ri_height;
CVS commit: src
Module Name:src Committed By: abs Date: Mon Dec 6 17:52:00 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers: Makefile src/external/mit/xorg/server/drivers/xf86-input-keyboard: Makefile src/external/mit/xorg/server/xorg-server.old/hw/xfree86/xorgos: Makefile src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos: Makefile src/share/mk: bsd.own.mk bsd.x11.mk Added Files: src/distrib/sets/lists/xdebug: md.pmax src/distrib/sets/lists/xserver: md.pmax Log Message: Add Xwsfb X server to pmax build With the previous tweak to TURBOchannel framebuffers in sys/dev/tc this should allows pmax to once again run X11. TODO: Investigate pullup to -9 To generate a diff of this commit: cvs rdiff -u -r0 -r1.3 src/distrib/sets/lists/xdebug/md.pmax cvs rdiff -u -r0 -r1.13 src/distrib/sets/lists/xserver/md.pmax cvs rdiff -u -r1.103 -r1.104 src/external/mit/xorg/server/drivers/Makefile cvs rdiff -u -r1.19 -r1.20 \ src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/mit/xorg/server/xorg-server.old/hw/xfree86/xorgos/Makefile cvs rdiff -u -r1.49 -r1.50 \ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile cvs rdiff -u -r1.1268 -r1.1269 src/share/mk/bsd.own.mk cvs rdiff -u -r1.141 -r1.142 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: abs Date: Mon Dec 6 17:52:00 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers: Makefile src/external/mit/xorg/server/drivers/xf86-input-keyboard: Makefile src/external/mit/xorg/server/xorg-server.old/hw/xfree86/xorgos: Makefile src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos: Makefile src/share/mk: bsd.own.mk bsd.x11.mk Added Files: src/distrib/sets/lists/xdebug: md.pmax src/distrib/sets/lists/xserver: md.pmax Log Message: Add Xwsfb X server to pmax build With the previous tweak to TURBOchannel framebuffers in sys/dev/tc this should allows pmax to once again run X11. TODO: Investigate pullup to -9 To generate a diff of this commit: cvs rdiff -u -r0 -r1.3 src/distrib/sets/lists/xdebug/md.pmax cvs rdiff -u -r0 -r1.13 src/distrib/sets/lists/xserver/md.pmax cvs rdiff -u -r1.103 -r1.104 src/external/mit/xorg/server/drivers/Makefile cvs rdiff -u -r1.19 -r1.20 \ src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/mit/xorg/server/xorg-server.old/hw/xfree86/xorgos/Makefile cvs rdiff -u -r1.49 -r1.50 \ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile cvs rdiff -u -r1.1268 -r1.1269 src/share/mk/bsd.own.mk cvs rdiff -u -r1.141 -r1.142 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/Makefile diff -u src/external/mit/xorg/server/drivers/Makefile:1.103 src/external/mit/xorg/server/drivers/Makefile:1.104 --- src/external/mit/xorg/server/drivers/Makefile:1.103 Sat Aug 28 08:56:10 2021 +++ src/external/mit/xorg/server/drivers/Makefile Mon Dec 6 17:51:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.103 2021/08/28 08:56:10 maya Exp $ +# $NetBSD: Makefile,v 1.104 2021/12/06 17:51:59 abs Exp $ .include @@ -337,10 +337,11 @@ SUBDIR+= \ .endif # ${MACHINE} == "sparc" .endif # ${MACHINE} == "sparc" || ${MACHINE} == "sparc64" -.if ${MACHINE} == "vax" +.if ${MACHINE} == "pmax" || \ +${MACHINE} == "vax" SUBDIR+= \ xf86-video-wsfb -.endif # ${MACHINE} == "vax" +.endif # ${MACHINE} == "pmax" || ${MACHINE} == "vax" .if ${MACHINE} == "zaurus" SUBDIR+= \ Index: src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.19 src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.20 --- src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.19 Thu Jun 3 07:37:00 2021 +++ src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile Mon Dec 6 17:51:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2021/06/03 07:37:00 rin Exp $ +# $NetBSD: Makefile,v 1.20 2021/12/06 17:51:59 abs Exp $ DRIVER= xf86-input-keyboard DRIVER_NAME= kbd_drv @@ -17,6 +17,7 @@ CPPFLAGS+= -DPCVT_SUPPORT ${MACHINE} == "amiga" || \ ${MACHINE} == "evbarm" || \ ${MACHINE} == "mac68k" || \ +${MACHINE} == "pmax" || \ ${MACHINE} == "sgimips" || \ ${MACHINE} == "shark" || \ ${MACHINE} == "sparc" || \ Index: src/external/mit/xorg/server/xorg-server.old/hw/xfree86/xorgos/Makefile diff -u src/external/mit/xorg/server/xorg-server.old/hw/xfree86/xorgos/Makefile:1.1.1.1 src/external/mit/xorg/server/xorg-server.old/hw/xfree86/xorgos/Makefile:1.2 --- src/external/mit/xorg/server/xorg-server.old/hw/xfree86/xorgos/Makefile:1.1.1.1 Fri Jun 10 03:42:14 2016 +++ src/external/mit/xorg/server/xorg-server.old/hw/xfree86/xorgos/Makefile Mon Dec 6 17:52:00 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.1.1 2016/06/10 03:42:14 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2021/12/06 17:52:00 abs Exp $ .include "../../../Makefile.serverlib" .include "../../../Makefile.servermod" @@ -99,7 +99,8 @@ CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSES .endfor .endif -.if ${MACHINE} == "vax" +.if ${MACHINE} == "pmax" || \ +${MACHINE} == "vax" SRCS.bsd+= ppc_video.c pm_noop.c agp_noop.c .for _FN in ${SRCS.bsd} CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.49 src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.50 --- src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile:1.49 Sun Mar 7 10:42:27 2021 +++ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile Mon Dec 6 17:51:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.49 2021/03/07 10:42:27 rin Exp $ +# $NetBSD: Makefile,v 1.50 2021/12/06 17:51:59 abs Exp $ .include "../../../Makefile.serverlib" .include "../../../Makefile.servermod" @@ -108,7 +108,8 @@ CPPFLAGS.${_FN}= -DWSCONS_SUPPORT -DUSES .endfor .endif -.if ${MACHINE} == "vax" +.if ${MACHINE} == "pmax" || \ +${MACHINE} ==
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Mon Dec 6 19:28:58 UTC 2021 Modified Files: src/sys/dev/usb [netbsd-9]: ehci.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1386): sys/dev/usb/ehci.c: revision 1.287 ehci: Replace bogus polling during suspend by taking bus lock. The system is not at high IPL or limited to a single CPU at this point; it is running essentially normally, just with some devices suspended. Other threads might be trying to touch EHCI registers, which might have bad outcomes while we're suspending stuff. Enabling polling only makes sense if there is a single thread and single CPU running, such as when we enter ddb on crash. To generate a diff of this commit: cvs rdiff -u -r1.267.2.5 -r1.267.2.6 src/sys/dev/usb/ehci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Mon Dec 6 19:28:58 UTC 2021 Modified Files: src/sys/dev/usb [netbsd-9]: ehci.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1386): sys/dev/usb/ehci.c: revision 1.287 ehci: Replace bogus polling during suspend by taking bus lock. The system is not at high IPL or limited to a single CPU at this point; it is running essentially normally, just with some devices suspended. Other threads might be trying to touch EHCI registers, which might have bad outcomes while we're suspending stuff. Enabling polling only makes sense if there is a single thread and single CPU running, such as when we enter ddb on crash. To generate a diff of this commit: cvs rdiff -u -r1.267.2.5 -r1.267.2.6 src/sys/dev/usb/ehci.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/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.267.2.5 src/sys/dev/usb/ehci.c:1.267.2.6 --- src/sys/dev/usb/ehci.c:1.267.2.5 Fri Sep 3 10:25:36 2021 +++ src/sys/dev/usb/ehci.c Mon Dec 6 19:28:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.267.2.5 2021/09/03 10:25:36 martin Exp $ */ +/* $NetBSD: ehci.c,v 1.267.2.6 2021/12/06 19:28:57 martin Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.267.2.5 2021/09/03 10:25:36 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.267.2.6 2021/12/06 19:28:57 martin Exp $"); #include "ohci.h" #include "uhci.h" @@ -1384,10 +1384,6 @@ ehci_activate(device_t self, enum devact /* * Handle suspend/resume. * - * We need to switch to polling mode here, because this routine is - * called from an interrupt context. This is all right since we - * are almost suspended anyway. - * * Note that this power handler isn't to be registered directly; the * bus glue needs to call out to it. */ @@ -1400,9 +1396,7 @@ ehci_suspend(device_t dv, const pmf_qual EHCIHIST_FUNC(); EHCIHIST_CALLED(); - mutex_spin_enter(&sc->sc_intr_lock); - sc->sc_bus.ub_usepolling++; - mutex_spin_exit(&sc->sc_intr_lock); + mutex_enter(&sc->sc_lock); for (i = 1; i <= sc->sc_noport; i++) { cmd = EOREAD4(sc, EHCI_PORTSC(i)) & ~EHCI_PS_CLEAR; @@ -1438,9 +1432,7 @@ ehci_suspend(device_t dv, const pmf_qual if (hcr != EHCI_STS_HCH) printf("%s: config timeout\n", device_xname(dv)); - mutex_spin_enter(&sc->sc_intr_lock); - sc->sc_bus.ub_usepolling--; - mutex_spin_exit(&sc->sc_intr_lock); + mutex_exit(&sc->sc_lock); return true; } @@ -1454,6 +1446,8 @@ ehci_resume(device_t dv, const pmf_qual_ EHCIHIST_FUNC(); EHCIHIST_CALLED(); + mutex_enter(&sc->sc_lock); + /* restore things in case the bios sucks */ EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); EOWRITE4(sc, EHCI_PERIODICLISTBASE, DMAADDR(&sc->sc_fldma, 0)); @@ -1499,6 +1493,8 @@ ehci_resume(device_t dv, const pmf_qual_ if (hcr == EHCI_STS_HCH) printf("%s: config timeout\n", device_xname(dv)); + mutex_exit(&sc->sc_lock); + return true; }
CVS commit: [netbsd-9] src/sys/dev/i2c
Module Name:src Committed By: martin Date: Mon Dec 6 19:33:07 UTC 2021 Modified Files: src/sys/dev/i2c [netbsd-9]: sdtemp.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1387): sys/dev/i2c/sdtemp.c: revision 1.41 Use aprint_debug instead of aprint_error for expected failure. To generate a diff of this commit: cvs rdiff -u -r1.35.4.1 -r1.35.4.2 src/sys/dev/i2c/sdtemp.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/i2c/sdtemp.c diff -u src/sys/dev/i2c/sdtemp.c:1.35.4.1 src/sys/dev/i2c/sdtemp.c:1.35.4.2 --- src/sys/dev/i2c/sdtemp.c:1.35.4.1 Fri Jul 10 10:33:38 2020 +++ src/sys/dev/i2c/sdtemp.c Mon Dec 6 19:33:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sdtemp.c,v 1.35.4.1 2020/07/10 10:33:38 martin Exp $*/ +/* $NetBSD: sdtemp.c,v 1.35.4.2 2021/12/06 19:33:07 martin Exp $*/ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.35.4.1 2020/07/10 10:33:38 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.35.4.2 2021/12/06 19:33:07 martin Exp $"); #include #include @@ -696,8 +696,8 @@ sdtemp_config_mcp(struct sdtemp_softc *s if (rv == 0) sc->sc_resolution = SDTEMP_CAP_RESOLUTION_MAX; else - aprint_error("%s: error %d writing resolution register\n", - device_xname(sc->sc_dev), rv); + aprint_debug_dev(sc->sc_dev, + "error %d writing resolution register\n", rv); } static void @@ -716,8 +716,8 @@ sdtemp_config_idt(struct sdtemp_softc *s if (rv == 0) sc->sc_resolution = SDTEMP_CAP_RESOLUTION_MAX; else - aprint_error("%s: error %d writing resolution register\n", - device_xname(sc->sc_dev), rv); + aprint_debug_dev(sc->sc_dev, + "error %d writing resolution register\n", rv); } MODULE(MODULE_CLASS_DRIVER, sdtemp, "i2cexec,sysmon_envsys");
CVS commit: [netbsd-9] src/sys/dev/i2c
Module Name:src Committed By: martin Date: Mon Dec 6 19:33:07 UTC 2021 Modified Files: src/sys/dev/i2c [netbsd-9]: sdtemp.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1387): sys/dev/i2c/sdtemp.c: revision 1.41 Use aprint_debug instead of aprint_error for expected failure. To generate a diff of this commit: cvs rdiff -u -r1.35.4.1 -r1.35.4.2 src/sys/dev/i2c/sdtemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/i2c
Module Name:src Committed By: martin Date: Mon Dec 6 19:34:29 UTC 2021 Modified Files: src/sys/dev/i2c [netbsd-8]: sdtemp.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1716): sys/dev/i2c/sdtemp.c: revision 1.41 Use aprint_debug instead of aprint_error for expected failure. To generate a diff of this commit: cvs rdiff -u -r1.32.8.2 -r1.32.8.3 src/sys/dev/i2c/sdtemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/i2c
Module Name:src Committed By: martin Date: Mon Dec 6 19:34:29 UTC 2021 Modified Files: src/sys/dev/i2c [netbsd-8]: sdtemp.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1716): sys/dev/i2c/sdtemp.c: revision 1.41 Use aprint_debug instead of aprint_error for expected failure. To generate a diff of this commit: cvs rdiff -u -r1.32.8.2 -r1.32.8.3 src/sys/dev/i2c/sdtemp.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/i2c/sdtemp.c diff -u src/sys/dev/i2c/sdtemp.c:1.32.8.2 src/sys/dev/i2c/sdtemp.c:1.32.8.3 --- src/sys/dev/i2c/sdtemp.c:1.32.8.2 Mon Jul 20 19:00:40 2020 +++ src/sys/dev/i2c/sdtemp.c Mon Dec 6 19:34:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sdtemp.c,v 1.32.8.2 2020/07/20 19:00:40 martin Exp $*/ +/* $NetBSD: sdtemp.c,v 1.32.8.3 2021/12/06 19:34:29 martin Exp $*/ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.32.8.2 2020/07/20 19:00:40 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.32.8.3 2021/12/06 19:34:29 martin Exp $"); #include #include @@ -696,8 +696,8 @@ sdtemp_config_mcp(struct sdtemp_softc *s if (rv == 0) sc->sc_resolution = SDTEMP_CAP_RESOLUTION_MAX; else - aprint_error("%s: error %d writing resolution register\n", - device_xname(sc->sc_dev), rv); + aprint_debug_dev(sc->sc_dev, + "error %d writing resolution register\n", rv); } static void @@ -716,8 +716,8 @@ sdtemp_config_idt(struct sdtemp_softc *s if (rv == 0) sc->sc_resolution = SDTEMP_CAP_RESOLUTION_MAX; else - aprint_error("%s: error %d writing resolution register\n", - device_xname(sc->sc_dev), rv); + aprint_debug_dev(sc->sc_dev, + "error %d writing resolution register\n", rv); } MODULE(MODULE_CLASS_DRIVER, sdtemp, "i2cexec,sysmon_envsys");
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Dec 6 21:24:07 UTC 2021 Modified Files: src/usr.bin/make: var.c Log Message: make: extract common code into Expr_Str This change turns Expr into a more abstract data type. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.964 -r1.965 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Dec 6 21:24:07 UTC 2021 Modified Files: src/usr.bin/make: var.c Log Message: make: extract common code into Expr_Str This change turns Expr into a more abstract data type. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.964 -r1.965 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.964 src/usr.bin/make/var.c:1.965 --- src/usr.bin/make/var.c:1.964 Sun Dec 5 17:00:02 2021 +++ src/usr.bin/make/var.c Mon Dec 6 21:24:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.964 2021/12/05 17:00:02 rillig Exp $ */ +/* $NetBSD: var.c,v 1.965 2021/12/06 21:24:07 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -140,7 +140,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.964 2021/12/05 17:00:02 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.965 2021/12/06 21:24:07 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -2085,6 +2085,12 @@ Expr_Define(Expr *expr) expr->defined = DEF_DEFINED; } +static const char * +Expr_Str(const Expr *expr) +{ + return expr->value.str; +} + static void Expr_SetValue(Expr *expr, FStr value) { @@ -2383,7 +2389,7 @@ ModifyWords(ModChain *ch, bool oneBigWord) { Expr *expr = ch->expr; - const char *val = expr->value.str; + const char *val = Expr_Str(expr); SepBuf result; SubstringWords words; size_t i; @@ -2587,7 +2593,7 @@ ApplyModifier_Gmtime(const char **pp, Mo expr = ch->expr; if (Expr_ShouldEval(expr)) Expr_SetValueOwn(expr, - VarStrftime(expr->value.str, true, utc)); + VarStrftime(Expr_Str(expr), true, utc)); return AMR_OK; } @@ -2619,7 +2625,7 @@ ApplyModifier_Localtime(const char **pp, expr = ch->expr; if (Expr_ShouldEval(expr)) Expr_SetValueOwn(expr, - VarStrftime(expr->value.str, false, utc)); + VarStrftime(Expr_Str(expr), false, utc)); return AMR_OK; } @@ -2633,7 +2639,7 @@ ApplyModifier_Hash(const char **pp, ModC *pp += 4; if (ModChain_ShouldEval(ch)) - Expr_SetValueOwn(ch->expr, VarHash(ch->expr->value.str)); + Expr_SetValueOwn(ch->expr, VarHash(Expr_Str(ch->expr))); return AMR_OK; } @@ -2732,7 +2738,7 @@ ApplyModifier_Range(const char **pp, Mod return AMR_OK; if (n == 0) { - SubstringWords words = Substring_Words(ch->expr->value.str, + SubstringWords words = Substring_Words(Expr_Str(ch->expr), false); n = words.len; SubstringWords_Free(words); @@ -3003,7 +3009,7 @@ ApplyModifier_Quote(const char **pp, Mod if (!ModChain_ShouldEval(ch)) return AMR_OK; - VarQuote(ch->expr->value.str, quoteDollar, &buf); + VarQuote(Expr_Str(ch->expr), quoteDollar, &buf); if (buf.data != NULL) Expr_SetValue(ch->expr, LazyBuf_DoneGet(&buf)); else @@ -3155,14 +3161,14 @@ ApplyModifier_To(const char **pp, ModCha if (mod[1] == 'u') {/* :tu */ *pp = mod + 2; if (Expr_ShouldEval(expr)) - Expr_SetValueOwn(expr, str_toupper(expr->value.str)); + Expr_SetValueOwn(expr, str_toupper(Expr_Str(expr))); return AMR_OK; } if (mod[1] == 'l') {/* :tl */ *pp = mod + 2; if (Expr_ShouldEval(expr)) - Expr_SetValueOwn(expr, str_tolower(expr->value.str)); + Expr_SetValueOwn(expr, str_tolower(Expr_Str(expr))); return AMR_OK; } @@ -3212,7 +3218,7 @@ ApplyModifier_Words(const char **pp, Mod Buffer buf; SubstringWords words = Substring_Words( - expr->value.str, false); + Expr_Str(expr), false); size_t ac = words.len; SubstringWords_Free(words); @@ -3268,7 +3274,7 @@ ApplyModifier_Words(const char **pp, Mod /* Normal case: select the words described by first and last. */ Expr_SetValueOwn(expr, - VarSelectWords(expr->value.str, first, last, + VarSelectWords(Expr_Str(expr), first, last, ch->sep, ch->oneBigWord)); ok: @@ -3393,7 +3399,7 @@ ApplyModifier_Order(const char **pp, Mod if (!ModChain_ShouldEval(ch)) return AMR_OK; - words = Substring_Words(ch->expr->value.str, false); + words = Substring_Words(Expr_Str(ch->expr), false); if (cmp == NULL) ShuffleSubstrings(words.words, words.len); else { @@ -3602,7 +3608,7 @@ ApplyModifier_Remember(const char **pp, *pp = mod + 1; if (Expr_ShouldEval(expr)) - Var_Set(expr->scope, name.str, expr->value.str); + Var_Set(expr->scope, name.str, Expr_Str(expr)); FStr_Done(&name); return AMR_OK; @@ -3639,7 +3645,7 @@ ApplyModifier_Unique(const char **pp, Mo if (!ModChain_ShouldEval(ch)) return AMR_OK; - words = Substring_Words(ch->expr->value.str, false); + words = Substring_Words(Expr_Str(ch->expr), false); if (words.len > 1) { size_t si, di; @@ -3711,7 +3717,7 @@ ApplyModifier_SysV(const char **pp, ModC (*pp)--; /* Go back to the ch->endc. */ /* Do not tu
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Dec 6 22:07:53 UTC 2021 Modified Files: src/usr.bin/make: var.c Log Message: make: move low-level implementation details out of Var_Parse No functional change. To generate a diff of this commit: cvs rdiff -u -r1.965 -r1.966 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Dec 6 22:07:53 UTC 2021 Modified Files: src/usr.bin/make: var.c Log Message: make: move low-level implementation details out of Var_Parse No functional change. To generate a diff of this commit: cvs rdiff -u -r1.965 -r1.966 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.965 src/usr.bin/make/var.c:1.966 --- src/usr.bin/make/var.c:1.965 Mon Dec 6 21:24:07 2021 +++ src/usr.bin/make/var.c Mon Dec 6 22:07:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.965 2021/12/06 21:24:07 rillig Exp $ */ +/* $NetBSD: var.c,v 1.966 2021/12/06 22:07:53 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -140,7 +140,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.965 2021/12/06 21:24:07 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.966 2021/12/06 22:07:53 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -2027,7 +2027,7 @@ static const char ExprDefined_Name[][10] #define const_member /* no const possible */ #endif -/* A variable expression such as $@ or ${VAR:Mpattern:Q}. */ +/* An expression based on a variable, such as $@ or ${VAR:Mpattern:Q}. */ typedef struct Expr { const char *name; FStr value; @@ -4445,11 +4445,11 @@ ParseVarnameLong( /* Free the environment variable now since we own it. */ static void -FreeEnvVar(Var *v, FStr *inout_val) +FreeEnvVar(Var *v, Expr *expr) { char *varValue = Buf_DoneData(&v->val); - if (inout_val->str == varValue) - inout_val->freeIt = varValue; + if (expr->value.str == varValue) + expr->value.freeIt = varValue; else free(varValue); @@ -4615,14 +4615,14 @@ Var_Parse(const char **pp, GNode *scope, * Before applying any modifiers, expand any nested expressions from * the variable value. */ - if (strchr(expr.value.str, '$') != NULL && + if (strchr(Expr_Str(&expr), '$') != NULL && VarEvalMode_ShouldEval(emode)) { char *expanded; VarEvalMode nested_emode = emode; if (opts.strict) nested_emode = VarEvalMode_UndefOk(nested_emode); v->inUse = true; - (void)Var_Subst(expr.value.str, scope, nested_emode, + (void)Var_Subst(Expr_Str(&expr), scope, nested_emode, &expanded); v->inUse = false; /* TODO: handle errors */ @@ -4645,7 +4645,7 @@ Var_Parse(const char **pp, GNode *scope, *pp = p; if (v->fromEnv) { - FreeEnvVar(v, &expr.value); + FreeEnvVar(v, &expr); } else if (expr.defined != DEF_REGULAR) { if (expr.defined == DEF_UNDEF) {
CVS commit: src/usr.bin/what
Module Name:src Committed By: christos Date: Mon Dec 6 22:13:56 UTC 2021 Modified Files: src/usr.bin/what: what.c Log Message: Add a missing : specified by TOG (Andras Farkas) While here, simplify and use warn. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/what/what.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/what/what.c diff -u src/usr.bin/what/what.c:1.12 src/usr.bin/what/what.c:1.13 --- src/usr.bin/what/what.c:1.12 Sat Dec 12 04:50:12 2015 +++ src/usr.bin/what/what.c Mon Dec 6 17:13:56 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: what.c,v 1.12 2015/12/12 09:50:12 dholland Exp $ */ +/* $NetBSD: what.c,v 1.13 2021/12/06 22:13:56 christos Exp $ */ /* * Copyright (c) 1980, 1988, 1993 @@ -39,10 +39,11 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)what.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: what.c,v 1.12 2015/12/12 09:50:12 dholland Exp $"); +__RCSID("$NetBSD: what.c,v 1.13 2021/12/06 22:13:56 christos Exp $"); #endif /* not lint */ #include +#include #include #include #include @@ -81,16 +82,15 @@ main(int argc, char **argv) usage(); } else do { if (freopen(*argv, "r", stdin) == NULL) { - perror(*argv); - exit(matches ? EXIT_SUCCESS : 1); + warn("Cannot open `%s", *argv); + break; } - printf("%s\n", *argv); + printf("%s:\n", *argv); search(); } while (*++argv != NULL); /* Note: the standard explicitly specifies an exit status of 1. */ - exit(matches ? EXIT_SUCCESS : 1); - /* NOTREACHED */ + return matches ? EXIT_SUCCESS : EXIT_FAILURE; } static void @@ -122,6 +122,6 @@ static void usage(void) { - (void)fprintf(stderr, "usage: what [-s] file ...\n"); + (void)fprintf(stderr, "Usage: %s [-s] file ...\n", getprogname()); exit(1); }
CVS commit: src/usr.bin/what
Module Name:src Committed By: christos Date: Mon Dec 6 22:13:56 UTC 2021 Modified Files: src/usr.bin/what: what.c Log Message: Add a missing : specified by TOG (Andras Farkas) While here, simplify and use warn. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/what/what.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Mon Dec 6 22:35:20 UTC 2021 Modified Files: src/usr.bin/make/unit-tests: opt-tracefile.mk Log Message: tests/make: clean up after testing the option '-T' To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt-tracefile.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Mon Dec 6 22:35:20 UTC 2021 Modified Files: src/usr.bin/make/unit-tests: opt-tracefile.mk Log Message: tests/make: clean up after testing the option '-T' To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt-tracefile.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/opt-tracefile.mk diff -u src/usr.bin/make/unit-tests/opt-tracefile.mk:1.4 src/usr.bin/make/unit-tests/opt-tracefile.mk:1.5 --- src/usr.bin/make/unit-tests/opt-tracefile.mk:1.4 Sat Dec 4 07:23:43 2021 +++ src/usr.bin/make/unit-tests/opt-tracefile.mk Mon Dec 6 22:35:20 2021 @@ -1,4 +1,4 @@ -# $NetBSD: opt-tracefile.mk,v 1.4 2021/12/04 07:23:43 rillig Exp $ +# $NetBSD: opt-tracefile.mk,v 1.5 2021/12/06 22:35:20 rillig Exp $ # # Tests for the command line option '-T', which in jobs mode appends a trace # record to a trace log whenever a job is started or completed. @@ -8,6 +8,7 @@ all: .PHONY @${MAKE} -f ${MAKEFILE} -j1 -Topt-tracefile.log trace # Remove timestamps, process IDs and directory paths. @awk '{ print $$2, $$3 }' opt-tracefile.log + @rm opt-tracefile.log trace dependency1 dependency2: .PHONY @echo 'Making ${.TARGET} from ${.ALLSRC:S,^$,,W}.'
CVS commit: src/tests/lib/libcurses/slave
Module Name:src Committed By: rillig Date: Mon Dec 6 22:45:42 UTC 2021 Modified Files: src/tests/lib/libcurses/slave: commands.c curses_commands.c curses_commands.h Log Message: tests/libcurses: clean up comments To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libcurses/slave/commands.c cvs rdiff -u -r1.29 -r1.30 src/tests/lib/libcurses/slave/curses_commands.c cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libcurses/slave/curses_commands.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libcurses/slave
Module Name:src Committed By: rillig Date: Mon Dec 6 22:45:42 UTC 2021 Modified Files: src/tests/lib/libcurses/slave: commands.c curses_commands.c curses_commands.h Log Message: tests/libcurses: clean up comments To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/tests/lib/libcurses/slave/commands.c cvs rdiff -u -r1.29 -r1.30 src/tests/lib/libcurses/slave/curses_commands.c cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libcurses/slave/curses_commands.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/slave/commands.c diff -u src/tests/lib/libcurses/slave/commands.c:1.16 src/tests/lib/libcurses/slave/commands.c:1.17 --- src/tests/lib/libcurses/slave/commands.c:1.16 Sat Sep 4 01:34:32 2021 +++ src/tests/lib/libcurses/slave/commands.c Mon Dec 6 22:45:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: commands.c,v 1.16 2021/09/04 01:34:32 rin Exp $ */ +/* $NetBSD: commands.c,v 1.17 2021/12/06 22:45:42 rillig Exp $ */ /*- * Copyright 2009 Brett Lymn @@ -108,7 +108,7 @@ write_to_director_type(data_enum_t retur } /* - * Report an pointer value back to the director + * Report a pointer value back to the director */ void report_ptr(void *ptr) Index: src/tests/lib/libcurses/slave/curses_commands.c diff -u src/tests/lib/libcurses/slave/curses_commands.c:1.29 src/tests/lib/libcurses/slave/curses_commands.c:1.30 --- src/tests/lib/libcurses/slave/curses_commands.c:1.29 Sun Jun 13 21:54:51 2021 +++ src/tests/lib/libcurses/slave/curses_commands.c Mon Dec 6 22:45:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: curses_commands.c,v 1.29 2021/06/13 21:54:51 rillig Exp $ */ +/* $NetBSD: curses_commands.c,v 1.30 2021/12/06 22:45:42 rillig Exp $ */ /*- * Copyright 2009 Brett Lymn @@ -150,8 +150,8 @@ set_scrn(const char *arg, SCREEN **x) return /* - * Required by the API, intended for future extensions, but this - * implementation does not support the extension. + * These NULL argument is required by the API, intended for future extensions, + * but this implementation does not support the extension. */ #define ARG_NULL() \ args++ Index: src/tests/lib/libcurses/slave/curses_commands.h diff -u src/tests/lib/libcurses/slave/curses_commands.h:1.8 src/tests/lib/libcurses/slave/curses_commands.h:1.9 --- src/tests/lib/libcurses/slave/curses_commands.h:1.8 Sun Jun 13 19:17:53 2021 +++ src/tests/lib/libcurses/slave/curses_commands.h Mon Dec 6 22:45:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: curses_commands.h,v 1.8 2021/06/13 19:17:53 rillig Exp $ */ +/* $NetBSD: curses_commands.h,v 1.9 2021/12/06 22:45:42 rillig Exp $ */ /*- * Copyright 2009 Brett Lymn @@ -42,7 +42,7 @@ struct command_def { void cmd_DRAIN(int, char **); /* not a curses function */ -/* These functions can be called before initscr*/ +/* These functions can be called before initscr */ void cmd_filter(int, char **); void cmd_ripoffline(int, char **); void cmd_use_env(int, char **); @@ -398,7 +398,7 @@ void cmd_mvwinwstr(int, char **); void cmd_winnwstr(int, char **); void cmd_winwstr(int, char **); -/* cchar handlgin */ +/* cchar handling */ void cmd_setcchar(int, char **); void cmd_getcchar(int, char **);
CVS commit: src/external/lgpl3/gmp/lib/libgmp
Module Name:src Committed By: rillig Date: Mon Dec 6 23:05:36 UTC 2021 Modified Files: src/external/lgpl3/gmp/lib/libgmp: Makefile Log Message: libgmp: suppress a few lint warnings Instead of erroring out due to the unknown function alloca, lint now warns about a pointer/integer mismatch since it wrongly assumes that all __builtin functions return int. The warning is still better than a failing build though. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/external/lgpl3/gmp/lib/libgmp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/lgpl3/gmp/lib/libgmp
Module Name:src Committed By: rillig Date: Mon Dec 6 23:05:36 UTC 2021 Modified Files: src/external/lgpl3/gmp/lib/libgmp: Makefile Log Message: libgmp: suppress a few lint warnings Instead of erroring out due to the unknown function alloca, lint now warns about a pointer/integer mismatch since it wrongly assumes that all __builtin functions return int. The warning is still better than a failing build though. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/external/lgpl3/gmp/lib/libgmp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/gmp/lib/libgmp/Makefile diff -u src/external/lgpl3/gmp/lib/libgmp/Makefile:1.29 src/external/lgpl3/gmp/lib/libgmp/Makefile:1.30 --- src/external/lgpl3/gmp/lib/libgmp/Makefile:1.29 Sat Sep 18 01:47:10 2021 +++ src/external/lgpl3/gmp/lib/libgmp/Makefile Mon Dec 6 23:05:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2021/09/18 01:47:10 christos Exp $ +# $NetBSD: Makefile,v 1.30 2021/12/06 23:05:36 rillig Exp $ .include @@ -265,3 +265,10 @@ CWARNFLAGS.clang+= -Wno-unused-value -Wn .if !empty(CFLAGS:M-fPIE) M4FLAGS+=-DPIC .endif + +# redc_n.c(62): error: function 'alloca' implicitly declared to return int [215] +LINTFLAGS+= -Dalloca=__builtin_alloca +# gmp-impl.h(5172): warning: constant in conditional context [161] +LINTFLAGS+= -X 161 +# gmp-impl.h(5187): warning: bitwise '>>' on signed value possibly nonportable [117] +LINTFLAGS+= -X 117
CVS commit: src/external/lgpl3/gmp/lib/libgmp
Module Name:src Committed By: rillig Date: Mon Dec 6 23:07:49 UTC 2021 Modified Files: src/external/lgpl3/gmp/lib/libgmp: Makefile Log Message: libgmp: fix unwarranted ignored error on 'make clean' rmdir: dummy: No such file or directory *** Error code 1 (ignored) To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/external/lgpl3/gmp/lib/libgmp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/lgpl3/gmp/lib/libgmp
Module Name:src Committed By: rillig Date: Mon Dec 6 23:07:49 UTC 2021 Modified Files: src/external/lgpl3/gmp/lib/libgmp: Makefile Log Message: libgmp: fix unwarranted ignored error on 'make clean' rmdir: dummy: No such file or directory *** Error code 1 (ignored) To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/external/lgpl3/gmp/lib/libgmp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/gmp/lib/libgmp/Makefile diff -u src/external/lgpl3/gmp/lib/libgmp/Makefile:1.30 src/external/lgpl3/gmp/lib/libgmp/Makefile:1.31 --- src/external/lgpl3/gmp/lib/libgmp/Makefile:1.30 Mon Dec 6 23:05:36 2021 +++ src/external/lgpl3/gmp/lib/libgmp/Makefile Mon Dec 6 23:07:49 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2021/12/06 23:05:36 rillig Exp $ +# $NetBSD: Makefile,v 1.31 2021/12/06 23:07:49 rillig Exp $ .include @@ -219,7 +219,7 @@ ${.OBJDIR}/config.m4: ${.CURDIR}/arch/${ CLEANFILES+= config.m4 clean: cleandummy cleandummy: .PHONY - -rmdir dummy + -if [ -d dummy ]; then rmdir dummy; fi BUILD_S_INCS= -I${.CURDIR} -I${.OBJDIR}/dummy -I${DIST}/ -I${DIST}/mpn \ -I${.OBJDIR}
CVS commit: src
Module Name:src Committed By: rillig Date: Mon Dec 6 23:20:26 UTC 2021 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: Makefile Added Files: src/tests/usr.bin/xlint/lint1: gcc_builtin_alloca.c gcc_builtin_alloca.exp Log Message: tests/lint: demonstrate wrong warning for __builtin_alloca To generate a diff of this commit: cvs rdiff -u -r1.1174 -r1.1175 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.114 -r1.115 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c \ src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Mon Dec 6 23:20:26 UTC 2021 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: Makefile Added Files: src/tests/usr.bin/xlint/lint1: gcc_builtin_alloca.c gcc_builtin_alloca.exp Log Message: tests/lint: demonstrate wrong warning for __builtin_alloca To generate a diff of this commit: cvs rdiff -u -r1.1174 -r1.1175 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.114 -r1.115 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c \ src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1174 src/distrib/sets/lists/tests/mi:1.1175 --- src/distrib/sets/lists/tests/mi:1.1174 Sun Dec 5 15:20:13 2021 +++ src/distrib/sets/lists/tests/mi Mon Dec 6 23:20:26 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1174 2021/12/05 15:20:13 rillig Exp $ +# $NetBSD: mi,v 1.1175 2021/12/06 23:20:26 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6468,6 +6468,8 @@ ./usr/tests/usr.bin/xlint/lint1/gcc_attribute_var.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_bit_field_types.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_bit_field_types.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_builtin_overflow.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_builtin_overflow.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/gcc_cast_union.c tests-usr.bin-tests compattestfile,atf Index: src/tests/usr.bin/xlint/lint1/Makefile diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.114 src/tests/usr.bin/xlint/lint1/Makefile:1.115 --- src/tests/usr.bin/xlint/lint1/Makefile:1.114 Sat Oct 30 22:04:42 2021 +++ src/tests/usr.bin/xlint/lint1/Makefile Mon Dec 6 23:20:26 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.114 2021/10/30 22:04:42 rillig Exp $ +# $NetBSD: Makefile,v 1.115 2021/12/06 23:20:26 rillig Exp $ NOMAN= # defined MAX_MESSAGE= 348 # see lint1/err.c @@ -174,6 +174,8 @@ FILES+= gcc_attribute_var.c FILES+= gcc_attribute_var.exp FILES+= gcc_bit_field_types.c FILES+= gcc_bit_field_types.exp +FILES+= gcc_builtin_alloca.c +FILES+= gcc_builtin_alloca.exp FILES+= gcc_builtin_overflow.c FILES+= gcc_builtin_overflow.exp FILES+= gcc_cast_union.c Added files: Index: src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c diff -u /dev/null src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c:1.1 --- /dev/null Mon Dec 6 23:20:26 2021 +++ src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c Mon Dec 6 23:20:26 2021 @@ -0,0 +1,21 @@ +/* $NetBSD: gcc_builtin_alloca.c,v 1.1 2021/12/06 23:20:26 rillig Exp $ */ +# 3 "gcc_builtin_alloca.c" + +/* + * Test for the GCC builtin functions __builtin_alloca*, which unlike most + * other builtin functions return a pointer instead of int. + * + * https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html + */ + +void +example(void) +{ + /* expect+1: warning: illegal combination of pointer (pointer to char) and integer (int) [183] */ + char *ptr = __builtin_alloca(8); + ptr[4] = '4'; + + /* expect+1: warning: illegal combination of pointer (pointer to char) and integer (int) [183] */ + char *aligned_ptr = __builtin_alloca_with_align(8, 64); + aligned_ptr[0] = '\0'; +} Index: src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp diff -u /dev/null src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp:1.1 --- /dev/null Mon Dec 6 23:20:26 2021 +++ src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp Mon Dec 6 23:20:26 2021 @@ -0,0 +1,2 @@ +gcc_builtin_alloca.c(15): warning: illegal combination of pointer (pointer to char) and integer (int) [183] +gcc_builtin_alloca.c(19): warning: illegal combination of pointer (pointer to char) and integer (int) [183]
CVS commit: src
Module Name:src Committed By: rillig Date: Mon Dec 6 23:26:28 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: gcc_builtin_alloca.c gcc_builtin_alloca.exp src/usr.bin/xlint/lint1: tree.c Log Message: lint: fix return type of GCC's __builtin_alloca Needed for libgmp. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c \ src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp cvs rdiff -u -r1.396 -r1.397 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c diff -u src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c:1.1 src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c:1.2 --- src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c:1.1 Mon Dec 6 23:20:26 2021 +++ src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c Mon Dec 6 23:26:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gcc_builtin_alloca.c,v 1.1 2021/12/06 23:20:26 rillig Exp $ */ +/* $NetBSD: gcc_builtin_alloca.c,v 1.2 2021/12/06 23:26:28 rillig Exp $ */ # 3 "gcc_builtin_alloca.c" /* @@ -11,11 +11,13 @@ void example(void) { - /* expect+1: warning: illegal combination of pointer (pointer to char) and integer (int) [183] */ char *ptr = __builtin_alloca(8); ptr[4] = '4'; - /* expect+1: warning: illegal combination of pointer (pointer to char) and integer (int) [183] */ char *aligned_ptr = __builtin_alloca_with_align(8, 64); aligned_ptr[0] = '\0'; + + /* expect+1: warning: illegal combination of pointer (pointer to char) and integer (int) [183] */ + char *unknown = __builtin_allocate(8); + unknown[0] = '\0'; } Index: src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp diff -u src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp:1.1 src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp:1.2 --- src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp:1.1 Mon Dec 6 23:20:26 2021 +++ src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp Mon Dec 6 23:26:28 2021 @@ -1,2 +1 @@ -gcc_builtin_alloca.c(15): warning: illegal combination of pointer (pointer to char) and integer (int) [183] -gcc_builtin_alloca.c(19): warning: illegal combination of pointer (pointer to char) and integer (int) [183] +gcc_builtin_alloca.c(21): warning: illegal combination of pointer (pointer to char) and integer (int) [183] Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.396 src/usr.bin/xlint/lint1/tree.c:1.397 --- src/usr.bin/xlint/lint1/tree.c:1.396 Sat Dec 4 00:01:24 2021 +++ src/usr.bin/xlint/lint1/tree.c Mon Dec 6 23:26:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.396 2021/12/04 00:01:24 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.397 2021/12/06 23:26:28 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tree.c,v 1.396 2021/12/04 00:01:24 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.397 2021/12/06 23:26:28 rillig Exp $"); #endif #include @@ -234,6 +234,14 @@ is_gcc_bool_builtin(const char *name) str_endswith(name, "_overflow_p")); } +/* https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */ +static bool +is_gcc_void_pointer_builtin(const char *name) +{ + return strcmp(name, "__builtin_alloca") == 0 || + strncmp(name, "__builtin_alloca_", 17) == 0; +} + static void build_name_call(sym_t *sym) { @@ -247,6 +255,8 @@ build_name_call(sym_t *sym) if (is_gcc_bool_builtin(sym->s_name)) sym->s_type = gettyp(BOOL); + else if (is_gcc_void_pointer_builtin(sym->s_name)) + sym->s_type = derive_type(gettyp(VOID), PTR); } else if (Sflag) { /* function '%s' implicitly declared to return int */
CVS commit: src
Module Name:src Committed By: rillig Date: Mon Dec 6 23:26:28 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: gcc_builtin_alloca.c gcc_builtin_alloca.exp src/usr.bin/xlint/lint1: tree.c Log Message: lint: fix return type of GCC's __builtin_alloca Needed for libgmp. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c \ src/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.exp cvs rdiff -u -r1.396 -r1.397 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/lgpl3/gmp/dist
Module Name:src Committed By: christos Date: Tue Dec 7 02:22:37 UTC 2021 Modified Files: src/external/lgpl3/gmp/dist: gmp-impl.h Log Message: fix alloca for NetBSD lint To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/lgpl3/gmp/dist/gmp-impl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/lgpl3/gmp/dist
Module Name:src Committed By: christos Date: Tue Dec 7 02:22:37 UTC 2021 Modified Files: src/external/lgpl3/gmp/dist: gmp-impl.h Log Message: fix alloca for NetBSD lint To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/lgpl3/gmp/dist/gmp-impl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/gmp/dist/gmp-impl.h diff -u src/external/lgpl3/gmp/dist/gmp-impl.h:1.6 src/external/lgpl3/gmp/dist/gmp-impl.h:1.7 --- src/external/lgpl3/gmp/dist/gmp-impl.h:1.6 Sun Jul 11 17:15:45 2021 +++ src/external/lgpl3/gmp/dist/gmp-impl.h Mon Dec 6 21:22:37 2021 @@ -210,6 +210,8 @@ see https://www.gnu.org/licenses/. */ # else # if !defined (__NetBSD__) char *alloca (); +# else +# include # endif # endif #endif
CVS commit: src/sys/arch/mips/adm5120/dev
Module Name:src Committed By: skrll Date: Tue Dec 7 06:49:15 UTC 2021 Modified Files: src/sys/arch/mips/adm5120/dev: ahci.c Log Message: Make this compile again. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/mips/adm5120/dev/ahci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/adm5120/dev
Module Name:src Committed By: skrll Date: Tue Dec 7 06:49:15 UTC 2021 Modified Files: src/sys/arch/mips/adm5120/dev: ahci.c Log Message: Make this compile again. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/mips/adm5120/dev/ahci.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/arch/mips/adm5120/dev/ahci.c diff -u src/sys/arch/mips/adm5120/dev/ahci.c:1.26 src/sys/arch/mips/adm5120/dev/ahci.c:1.27 --- src/sys/arch/mips/adm5120/dev/ahci.c:1.26 Mon Oct 4 21:02:40 2021 +++ src/sys/arch/mips/adm5120/dev/ahci.c Tue Dec 7 06:49:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ahci.c,v 1.26 2021/10/04 21:02:40 andvar Exp $ */ +/* $NetBSD: ahci.c,v 1.27 2021/12/07 06:49:15 skrll Exp $ */ /*- * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.26 2021/10/04 21:02:40 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.27 2021/12/07 06:49:15 skrll Exp $"); #include #include @@ -1236,7 +1236,7 @@ ahci_device_bulk_start(struct usbd_xfer i = 0; offset = 0; - while (len > 0) || i == 0) { + while (len > 0 || i == 0) { tlen = uimin(len,4096); td[i]->buffer = DMAADDR(&xfer->ux_dmabuf, offset) | 0xa000; td[i]->buflen = tlen;
CVS commit: src/usr.bin/what
Module Name:src Committed By: rillig Date: Tue Dec 7 06:53:57 UTC 2021 Modified Files: src/usr.bin/what: what.c Log Message: what: fix typo in warning To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/what/what.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/what
Module Name:src Committed By: rillig Date: Tue Dec 7 06:53:57 UTC 2021 Modified Files: src/usr.bin/what: what.c Log Message: what: fix typo in warning To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/what/what.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/what/what.c diff -u src/usr.bin/what/what.c:1.13 src/usr.bin/what/what.c:1.14 --- src/usr.bin/what/what.c:1.13 Mon Dec 6 22:13:56 2021 +++ src/usr.bin/what/what.c Tue Dec 7 06:53:56 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: what.c,v 1.13 2021/12/06 22:13:56 christos Exp $ */ +/* $NetBSD: what.c,v 1.14 2021/12/07 06:53:56 rillig Exp $ */ /* * Copyright (c) 1980, 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)what.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: what.c,v 1.13 2021/12/06 22:13:56 christos Exp $"); +__RCSID("$NetBSD: what.c,v 1.14 2021/12/07 06:53:56 rillig Exp $"); #endif /* not lint */ #include @@ -82,7 +82,7 @@ main(int argc, char **argv) usage(); } else do { if (freopen(*argv, "r", stdin) == NULL) { - warn("Cannot open `%s", *argv); + warn("Cannot open `%s'", *argv); break; } printf("%s:\n", *argv);
CVS commit: src/tests/lib/libcurses/slave
Module Name:src Committed By: rillig Date: Tue Dec 7 06:55:44 UTC 2021 Modified Files: src/tests/lib/libcurses/slave: curses_commands.c Log Message: tests/libcurses: fix grammar in comment (since yesterday) To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/tests/lib/libcurses/slave/curses_commands.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libcurses/slave
Module Name:src Committed By: rillig Date: Tue Dec 7 06:55:44 UTC 2021 Modified Files: src/tests/lib/libcurses/slave: curses_commands.c Log Message: tests/libcurses: fix grammar in comment (since yesterday) To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/tests/lib/libcurses/slave/curses_commands.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/slave/curses_commands.c diff -u src/tests/lib/libcurses/slave/curses_commands.c:1.30 src/tests/lib/libcurses/slave/curses_commands.c:1.31 --- src/tests/lib/libcurses/slave/curses_commands.c:1.30 Mon Dec 6 22:45:42 2021 +++ src/tests/lib/libcurses/slave/curses_commands.c Tue Dec 7 06:55:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: curses_commands.c,v 1.30 2021/12/06 22:45:42 rillig Exp $ */ +/* $NetBSD: curses_commands.c,v 1.31 2021/12/07 06:55:44 rillig Exp $ */ /*- * Copyright 2009 Brett Lymn @@ -150,8 +150,8 @@ set_scrn(const char *arg, SCREEN **x) return /* - * These NULL argument is required by the API, intended for future extensions, - * but this implementation does not support the extension. + * These NULL arguments are required by the API, intended for future + * extensions, but this implementation does not support any extensions. */ #define ARG_NULL() \ args++
CVS commit: src/tests/usr.bin/xlint
Module Name:src Committed By: rillig Date: Tue Dec 7 07:09:13 UTC 2021 Modified Files: src/tests/usr.bin/xlint: check-expect.lua Log Message: tests/lint: make error handling simpler The previous form was better suited for integrated unit tests (as in distrib/sets/fmt-list). These small validation programs are easy enough to be tested from the command line though. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/check-expect.lua Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/check-expect.lua diff -u src/tests/usr.bin/xlint/check-expect.lua:1.13 src/tests/usr.bin/xlint/check-expect.lua:1.14 --- src/tests/usr.bin/xlint/check-expect.lua:1.13 Sun Sep 5 19:16:37 2021 +++ src/tests/usr.bin/xlint/check-expect.lua Tue Dec 7 07:09:12 2021 @@ -1,5 +1,5 @@ #! /usr/bin/lua --- $NetBSD: check-expect.lua,v 1.13 2021/09/05 19:16:37 rillig Exp $ +-- $NetBSD: check-expect.lua,v 1.14 2021/12/07 07:09:12 rillig Exp $ --[[ @@ -11,6 +11,14 @@ actual messages found in the correspondi ]] +local had_errors = false +---@param fmt string +function print_error(fmt, ...) + print(fmt:format(...)) + had_errors = true +end + + local function load_lines(fname) local lines = {} @@ -26,7 +34,7 @@ local function load_lines(fname) end -local function load_expect_comments_from_c(fname, errors) +local function load_expect_comments_from_c(fname) local lines = load_lines(fname) if lines == nil then return nil, nil end @@ -61,7 +69,7 @@ local function load_expect_comments_from local ppl_lineno, ppl_fname = line:match("^#%s*(%d+)%s+\"([^\"]+)\"") if ppl_lineno ~= nil then if ppl_fname == fname and tonumber(ppl_lineno) ~= phys_lineno + 1 then -errors:add("error: %s:%d: preprocessor line number must be %d", +print_error("error: %s:%d: preprocessor line number must be %d", fname, phys_lineno, phys_lineno + 1) end pp_fname = ppl_fname @@ -93,11 +101,11 @@ local function load_actual_messages_from end -local function check_test(c_fname, errors) +local function check_test(c_fname) local exp_fname = c_fname:gsub("%.c$", ".exp") local comment_locations, comments_by_location = -load_expect_comments_from_c(c_fname, errors) +load_expect_comments_from_c(c_fname) if comment_locations == nil then return end local messages = load_actual_messages_from_exp(exp_fname) @@ -117,14 +125,15 @@ local function check_test(c_fname, error end if not found then - errors:add("error: %s: missing /* expect+1: %s */", act.location, exp_comment) + print_error("error: %s: missing /* expect+1: %s */", +act.location, exp_comment) end end for _, location in ipairs(comment_locations) do for _, message in ipairs(comments_by_location[location]) do if message ~= "" then -errors:add( +print_error( "error: %s: declared message \"%s\" is not in the actual output", location, message) end @@ -134,20 +143,11 @@ end local function main(args) - local errors = {} - errors.add = function(self, fmt, ...) -table.insert(self, string.format(fmt, ...)) - end - for _, name in ipairs(args) do -check_test(name, errors) +check_test(name) end - - for _, error in ipairs(errors) do -print(error) - end - - return #errors == 0 end -os.exit(main(arg)) + +main(arg) +os.exit(not had_errors)
CVS commit: src/tests/usr.bin/xlint
Module Name:src Committed By: rillig Date: Tue Dec 7 07:09:13 UTC 2021 Modified Files: src/tests/usr.bin/xlint: check-expect.lua Log Message: tests/lint: make error handling simpler The previous form was better suited for integrated unit tests (as in distrib/sets/fmt-list). These small validation programs are easy enough to be tested from the command line though. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/check-expect.lua Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Dec 7 07:54:32 UTC 2021 Modified Files: src/sys/dev/usb: ehci.c Log Message: Code consistency. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.287 -r1.288 src/sys/dev/usb/ehci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Dec 7 07:54:32 UTC 2021 Modified Files: src/sys/dev/usb: ehci.c Log Message: Code consistency. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.287 -r1.288 src/sys/dev/usb/ehci.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/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.287 src/sys/dev/usb/ehci.c:1.288 --- src/sys/dev/usb/ehci.c:1.287 Sun Dec 5 11:05:37 2021 +++ src/sys/dev/usb/ehci.c Tue Dec 7 07:54:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.287 2021/12/05 11:05:37 riastradh Exp $ */ +/* $NetBSD: ehci.c,v 1.288 2021/12/07 07:54:32 skrll Exp $ */ /* * Copyright (c) 2004-2012,2016,2020 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.287 2021/12/05 11:05:37 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.288 2021/12/07 07:54:32 skrll Exp $"); #include "ohci.h" #include "uhci.h" @@ -2788,7 +2788,6 @@ Static ehci_soft_qh_t * ehci_alloc_sqh(ehci_softc_t *sc) { ehci_soft_qh_t *sqh; - usbd_status err; int i, offs; usb_dma_t dma; @@ -2799,14 +2798,14 @@ ehci_alloc_sqh(ehci_softc_t *sc) DPRINTF("allocating chunk", 0, 0, 0, 0); mutex_exit(&sc->sc_lock); - err = usb_allocmem(&sc->sc_bus, EHCI_SQH_SIZE * EHCI_SQH_CHUNK, + int err = usb_allocmem(&sc->sc_bus, + EHCI_SQH_SIZE * EHCI_SQH_CHUNK, EHCI_PAGE_SIZE, USBMALLOC_COHERENT, &dma); -#ifdef EHCI_DEBUG - if (err) - printf("ehci_alloc_sqh: usb_allocmem()=%d\n", err); -#endif - if (err) + + if (err) { + DPRINTF("alloc returned %jd", err, 0, 0, 0); return NULL; + } mutex_enter(&sc->sc_lock); for (i = 0; i < EHCI_SQH_CHUNK; i++) { @@ -2852,15 +2851,13 @@ ehci_alloc_sqtd(ehci_softc_t *sc) mutex_exit(&sc->sc_lock); int err = usb_allocmem(&sc->sc_bus, - EHCI_SQTD_SIZE*EHCI_SQTD_CHUNK, - EHCI_PAGE_SIZE, USBMALLOC_COHERENT, - &dma); -#ifdef EHCI_DEBUG - if (err) - printf("ehci_alloc_sqtd: usb_allocmem()=%d\n", err); -#endif - if (err) - goto done; + EHCI_SQTD_SIZE * EHCI_SQTD_CHUNK, + EHCI_PAGE_SIZE, USBMALLOC_COHERENT, &dma); + + if (err) { + DPRINTF("alloc returned %jd", err, 0, 0, 0); + return NULL; + } mutex_enter(&sc->sc_lock); for (i = 0; i < EHCI_SQTD_CHUNK; i++) { @@ -2883,7 +2880,6 @@ ehci_alloc_sqtd(ehci_softc_t *sc) sqtd->nextqtd = NULL; sqtd->xfer = NULL; -done: return sqtd; } @@ -3109,15 +3105,17 @@ ehci_alloc_itd(ehci_softc_t *sc) if (freeitd == NULL) { DPRINTF("allocating chunk", 0, 0, 0, 0); mutex_exit(&sc->sc_lock); - int err = usb_allocmem(&sc->sc_bus, EHCI_ITD_SIZE * EHCI_ITD_CHUNK, + + int err = usb_allocmem(&sc->sc_bus, + EHCI_ITD_SIZE * EHCI_ITD_CHUNK, EHCI_PAGE_SIZE, USBMALLOC_COHERENT, &dma); if (err) { DPRINTF("alloc returned %jd", err, 0, 0, 0); return NULL; } - mutex_enter(&sc->sc_lock); + mutex_enter(&sc->sc_lock); for (int i = 0; i < EHCI_ITD_CHUNK; i++) { int offs = i * EHCI_ITD_SIZE; itd = KERNADDR(&dma, offs); @@ -3156,12 +3154,13 @@ ehci_alloc_sitd(ehci_softc_t *sc) if (freesitd == NULL) { DPRINTF("allocating chunk", 0, 0, 0, 0); mutex_exit(&sc->sc_lock); - int err = usb_allocmem(&sc->sc_bus, EHCI_SITD_SIZE * EHCI_SITD_CHUNK, + + int err = usb_allocmem(&sc->sc_bus, + EHCI_SITD_SIZE * EHCI_SITD_CHUNK, EHCI_PAGE_SIZE, USBMALLOC_COHERENT, &dma); if (err) { - DPRINTF("alloc returned %jd", err, 0, 0, - 0); + DPRINTF("alloc returned %jd", err, 0, 0, 0); return NULL; }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Dec 7 07:58:20 UTC 2021 Modified Files: src/sys/dev/usb: ehci.c Log Message: More usb_status_t -> int To generate a diff of this commit: cvs rdiff -u -r1.288 -r1.289 src/sys/dev/usb/ehci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Dec 7 07:58:20 UTC 2021 Modified Files: src/sys/dev/usb: ehci.c Log Message: More usb_status_t -> int To generate a diff of this commit: cvs rdiff -u -r1.288 -r1.289 src/sys/dev/usb/ehci.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/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.288 src/sys/dev/usb/ehci.c:1.289 --- src/sys/dev/usb/ehci.c:1.288 Tue Dec 7 07:54:32 2021 +++ src/sys/dev/usb/ehci.c Tue Dec 7 07:58:20 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.288 2021/12/07 07:54:32 skrll Exp $ */ +/* $NetBSD: ehci.c,v 1.289 2021/12/07 07:58:20 skrll Exp $ */ /* * Copyright (c) 2004-2012,2016,2020 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.288 2021/12/07 07:54:32 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.289 2021/12/07 07:58:20 skrll Exp $"); #include "ohci.h" #include "uhci.h" @@ -403,7 +403,7 @@ ehci_init(ehci_softc_t *sc) { uint32_t vers, sparams, cparams, hcr; u_int i; - usbd_status err; + int err; ehci_soft_qh_t *sqh; u_int ncomp;