CVS commit: src/sys/dev/pci

2022-07-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul  7 23:54:17 UTC 2022

Modified Files:
src/sys/dev/pci: nvme_pci.c

Log Message:
Add errno tto message when fail to attach the devsw


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/nvme_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/nvme_pci.c
diff -u src/sys/dev/pci/nvme_pci.c:1.32 src/sys/dev/pci/nvme_pci.c:1.33
--- src/sys/dev/pci/nvme_pci.c:1.32	Thu Mar 31 19:30:16 2022
+++ src/sys/dev/pci/nvme_pci.c	Thu Jul  7 23:54:17 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme_pci.c,v 1.32 2022/03/31 19:30:16 pgoyette Exp $	*/
+/*	$NetBSD: nvme_pci.c,v 1.33 2022/07/07 23:54:17 pgoyette Exp $	*/
 /*	$OpenBSD: nvme_pci.c,v 1.3 2016/04/14 11:18:32 dlg Exp $ */
 
 /*
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.32 2022/03/31 19:30:16 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.33 2022/07/07 23:54:17 pgoyette Exp $");
 
 #include 
 #include 
@@ -504,8 +504,8 @@ nvme_modcmd(modcmd_t cmd, void *opaque)
 		error = devsw_attach(nvme_cd.cd_name, NULL, ,
 		_cdevsw, );
 		if (error) {
-			aprint_error("%s: unable to register devsw\n",
-			nvme_cd.cd_name);
+			aprint_error("%s: unable to register devsw, err %d\n",
+			nvme_cd.cd_name, error);
 			/* do not abort, just /dev/nvme* will not work */
 		}
 		error = config_init_component(cfdriver_ioconf_nvme_pci,



CVS commit: src/sys/dev/pci

2022-07-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul  7 23:54:17 UTC 2022

Modified Files:
src/sys/dev/pci: nvme_pci.c

Log Message:
Add errno tto message when fail to attach the devsw


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/nvme_pci.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/nvmm

2022-07-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul  7 23:50:34 UTC 2022

Modified Files:
src/sys/dev/nvmm: nvmm.c

Log Message:
Only detach the cfdriver if we just attached it.

Report errno in message when fail to attach cdevsw


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/nvmm/nvmm.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/nvmm/nvmm.c
diff -u src/sys/dev/nvmm/nvmm.c:1.45 src/sys/dev/nvmm/nvmm.c:1.46
--- src/sys/dev/nvmm/nvmm.c:1.45	Wed Jul  6 13:10:49 2022
+++ src/sys/dev/nvmm/nvmm.c	Thu Jul  7 23:50:33 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm.c,v 1.45 2022/07/06 13:10:49 riastradh Exp $	*/
+/*	$NetBSD: nvmm.c,v 1.46 2022/07/07 23:50:33 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.45 2022/07/06 13:10:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.46 2022/07/07 23:50:33 pgoyette Exp $");
 
 #include 
 #include 
@@ -1255,7 +1255,9 @@ nvmm_modcmd(modcmd_t cmd, void *arg)
 #endif
 		error = config_cfattach_attach(nvmm_cd.cd_name, _ca);
 		if (error) {
+#if defined(_MODULE)
 			config_cfdriver_detach(_cd);
+#endif
 			aprint_error("%s: config_cfattach_attach failed\n",
 			nvmm_cd.cd_name);
 			return error;
@@ -1264,7 +1266,9 @@ nvmm_modcmd(modcmd_t cmd, void *arg)
 		error = config_cfdata_attach(nvmm_cfdata, 1);
 		if (error) {
 			config_cfattach_detach(nvmm_cd.cd_name, _ca);
+#if defined(_MODULE)
 			config_cfdriver_detach(_cd);
+#endif
 			aprint_error("%s: unable to register cfdata\n",
 			nvmm_cd.cd_name);
 			return error;
@@ -1274,7 +1278,9 @@ nvmm_modcmd(modcmd_t cmd, void *arg)
 			aprint_error("%s: config_attach_pseudo failed\n",
 			nvmm_cd.cd_name);
 			config_cfattach_detach(nvmm_cd.cd_name, _ca);
+#if defined(_MODULE)
 			config_cfdriver_detach(_cd);
+#endif
 			return ENXIO;
 		}
 
@@ -1283,8 +1289,8 @@ nvmm_modcmd(modcmd_t cmd, void *arg)
 		error = devsw_attach(nvmm_cd.cd_name, NULL, ,
 			_cdevsw, );
 		if (error) {
-			aprint_error("%s: unable to register devsw\n",
-			nvmm_cd.cd_name);
+			aprint_error("%s: unable to register devsw, err %d\n",
+			nvmm_cd.cd_name, error);
 			config_cfattach_detach(nvmm_cd.cd_name, _ca);
 			config_cfdriver_detach(_cd);
 			return error;



CVS commit: src/sys/dev/nvmm

2022-07-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul  7 23:50:34 UTC 2022

Modified Files:
src/sys/dev/nvmm: nvmm.c

Log Message:
Only detach the cfdriver if we just attached it.

Report errno in message when fail to attach cdevsw


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/nvmm/nvmm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2022-07-07 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Jul  7 20:22:03 UTC 2022

Modified Files:
src/share/man/man9: ioctl.9

Log Message:
fix reference to magma(4) by pointing to sparc/magma 4 and update the date.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/share/man/man9/ioctl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/ioctl.9
diff -u src/share/man/man9/ioctl.9:1.35 src/share/man/man9/ioctl.9:1.36
--- src/share/man/man9/ioctl.9:1.35	Thu Jul  7 20:07:47 2022
+++ src/share/man/man9/ioctl.9	Thu Jul  7 20:22:03 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: ioctl.9,v 1.35 2022/07/07 20:07:47 andvar Exp $
+.\" $NetBSD: ioctl.9,v 1.36 2022/07/07 20:22:03 andvar Exp $
 .\"
 .\" Copyright (c) 1999  The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 27, 2019
+.Dd July 7, 2022
 .Dt IOCTL 9
 .Os
 .Sh NAME
@@ -164,7 +164,7 @@ pci(4)
 .It 'P'
 compat/ossaudio and soundcard.h
 .It 'P'
-.Xr magma 4
+.Xr sparc/magma 4
 bpp (sparc)
 .It 'q'
 .Xr altq 9



CVS commit: src/share/man/man9

2022-07-07 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Jul  7 20:22:03 UTC 2022

Modified Files:
src/share/man/man9: ioctl.9

Log Message:
fix reference to magma(4) by pointing to sparc/magma 4 and update the date.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/share/man/man9/ioctl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2022-07-07 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Jul  7 20:07:47 UTC 2022

Modified Files:
src/share/man/man9: ioctl.9

Log Message:
remove reference to tb(4), which was removed back in 2005.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/ioctl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/ioctl.9
diff -u src/share/man/man9/ioctl.9:1.34 src/share/man/man9/ioctl.9:1.35
--- src/share/man/man9/ioctl.9:1.34	Sun Jan 27 08:53:29 2019
+++ src/share/man/man9/ioctl.9	Thu Jul  7 20:07:47 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: ioctl.9,v 1.34 2019/01/27 08:53:29 maxv Exp $
+.\" $NetBSD: ioctl.9,v 1.35 2022/07/07 20:07:47 andvar Exp $
 .\"
 .\" Copyright (c) 1999  The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -86,8 +86,6 @@ ADB devices (mac68k, macppc)
 .It 'A'
 .Xr audio 4
 .It 'b'
-.Xr \ 4
-.It 'b'
 Bluetooth HCI sockets, see
 .Xr bluetooth 4
 .It 'b'



CVS commit: src/share/man/man9

2022-07-07 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Jul  7 20:07:47 UTC 2022

Modified Files:
src/share/man/man9: ioctl.9

Log Message:
remove reference to tb(4), which was removed back in 2005.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/ioctl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2022-07-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul  7 18:17:33 UTC 2022

Modified Files:
src/sys/compat/common: uipc_syscalls_40.c
src/sys/net: if.c

Log Message:
ifioctl(9): Don't touch ifconf or ifreq until command is validated.

sys_ioctl validates the data pointer according to the command's size
and direction.  But userland may ioctl commands other than
OSIOCGIFCONF or OOSIOCGIFCONF -- and if userland passes an IOC_VOID
command, the argument is passed through verbatim and may be null.

Reported-by: syzbot+19b1bf83e5481273e...@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=f4c91a7dcd31901c80d91af6ed01456faf0a7286

Reported-by: syzbot+442c033feb784d055...@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=4a3a4b92dbe9695046ff17a5474cef52aed23e0b

Reported-by: syzbot+4c87d0cdf7025741e...@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=3e5f42c998e43ad42da40dec3c7873e6aae187e4


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.505 -r1.506 src/sys/net/if.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/compat/common/uipc_syscalls_40.c
diff -u src/sys/compat/common/uipc_syscalls_40.c:1.23 src/sys/compat/common/uipc_syscalls_40.c:1.24
--- src/sys/compat/common/uipc_syscalls_40.c:1.23	Thu Jul 16 15:02:08 2020
+++ src/sys/compat/common/uipc_syscalls_40.c	Thu Jul  7 18:17:33 2022
@@ -1,9 +1,9 @@
-/*	$NetBSD: uipc_syscalls_40.c,v 1.23 2020/07/16 15:02:08 msaitoh Exp $	*/
+/*	$NetBSD: uipc_syscalls_40.c,v 1.24 2022/07/07 18:17:33 riastradh Exp $	*/
 
 /* written by Pavel Cahyna, 2006. Public domain. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.23 2020/07/16 15:02:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.24 2022/07/07 18:17:33 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -41,7 +41,6 @@ compat_ifconf(u_long cmd, void *data)
 	struct oifreq ifr, *ifrp = NULL;
 	int space = 0, error = 0;
 	const int sz = (int)sizeof(ifr);
-	const bool docopy = ifc->ifc_req != NULL;
 	int s;
 	int bound;
 	struct psref psref;
@@ -54,6 +53,7 @@ compat_ifconf(u_long cmd, void *data)
 		return ENOSYS;
 	}
 
+	const bool docopy = ifc->ifc_req != NULL;
 	if (docopy) {
 		if (ifc->ifc_len < 0)
 			return EINVAL;

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.505 src/sys/net/if.c:1.506
--- src/sys/net/if.c:1.505	Sun May 22 11:27:36 2022
+++ src/sys/net/if.c	Thu Jul  7 18:17:33 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.505 2022/05/22 11:27:36 andvar Exp $	*/
+/*	$NetBSD: if.c,v 1.506 2022/07/07 18:17:33 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.505 2022/05/22 11:27:36 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.506 2022/07/07 18:17:33 riastradh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -3450,6 +3450,9 @@ doifioctl(struct socket *so, u_long cmd,
 		}
 	}
 
+	if ((cmd & IOC_IN) == 0 || IOCPARM_LEN(cmd) < sizeof(ifr->ifr_name))
+		return EINVAL;
+
 	bound = curlwp_bind();
 	ifp = if_get(ifr->ifr_name, );
 	if (ifp == NULL) {



CVS commit: src/sys

2022-07-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul  7 18:17:33 UTC 2022

Modified Files:
src/sys/compat/common: uipc_syscalls_40.c
src/sys/net: if.c

Log Message:
ifioctl(9): Don't touch ifconf or ifreq until command is validated.

sys_ioctl validates the data pointer according to the command's size
and direction.  But userland may ioctl commands other than
OSIOCGIFCONF or OOSIOCGIFCONF -- and if userland passes an IOC_VOID
command, the argument is passed through verbatim and may be null.

Reported-by: syzbot+19b1bf83e5481273e...@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=f4c91a7dcd31901c80d91af6ed01456faf0a7286

Reported-by: syzbot+442c033feb784d055...@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=4a3a4b92dbe9695046ff17a5474cef52aed23e0b

Reported-by: syzbot+4c87d0cdf7025741e...@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=3e5f42c998e43ad42da40dec3c7873e6aae187e4


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/common/uipc_syscalls_40.c
cvs rdiff -u -r1.505 -r1.506 src/sys/net/if.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/usr.bin/xlint/lint1

2022-07-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jul  7 18:11:30 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_132.c

Log Message:
tests/lint: document why in ic_expr, '&' does not need before_conversion


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/usr.bin/xlint/lint1/msg_132.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/usr.bin/xlint/lint1

2022-07-07 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jul  7 18:11:30 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_132.c

Log Message:
tests/lint: document why in ic_expr, '&' does not need before_conversion


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/usr.bin/xlint/lint1/msg_132.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/msg_132.c
diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.23 src/tests/usr.bin/xlint/lint1/msg_132.c:1.24
--- src/tests/usr.bin/xlint/lint1/msg_132.c:1.23	Wed Jul  6 22:26:31 2022
+++ src/tests/usr.bin/xlint/lint1/msg_132.c	Thu Jul  7 18:11:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_132.c,v 1.23 2022/07/06 22:26:31 rillig Exp $	*/
+/*	$NetBSD: msg_132.c,v 1.24 2022/07/07 18:11:29 rillig Exp $	*/
 # 3 "msg_132.c"
 
 // Test for message: conversion from '%s' to '%s' may lose accuracy [132]
@@ -329,3 +329,20 @@ test_ic_mod(void)
 	/* expect+1: warning: conversion from 'long long' to 'signed char' may lose accuracy [132] */
 	s8 = s64 % 1;
 }
+
+void
+test_ic_bitand(void)
+{
+	/*
+	 * ic_bitand assumes that integers are represented in 2's complement,
+	 * and that the sign bit of signed integers behaves like a value bit.
+	 * That way, the following expressions get their constraints computed
+	 * correctly, regardless of whether ic_expr takes care of integer
+	 * promotions or not.  Compare ic_mod, which ignores signed types.
+	 */
+
+	u8 = u8 & u16;
+
+	/* expect+1: warning: conversion from 'unsigned int' to 'unsigned char' may lose accuracy [132] */
+	u8 = u16 & u32;
+}



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2022-07-07 Thread Rin Okuyama
Module Name:xsrc
Committed By:   rin
Date:   Thu Jul  7 13:51:06 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
For xorg-server 1.10, do not require shadowUpdateAfb8() as
a runtime dependency.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2022-07-07 Thread Rin Okuyama
Module Name:xsrc
Committed By:   rin
Date:   Thu Jul  7 13:51:06 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
For xorg-server 1.10, do not require shadowUpdateAfb8() as
a runtime dependency.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.41 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.42
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.41	Thu Jul  7 12:56:01 2022
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Thu Jul  7 13:51:06 2022
@@ -213,7 +213,9 @@ static const char *shadowSymbols[] = {
 	"shadowUpdatePackedWeak",
 	"shadowUpdateRotatePacked",
 	"shadowUpdateRotatePackedWeak",
+#if XORG_VERSION_CURRENT >= (1) * 1000 + (20) * 10
 	"shadowUpdateAfb8",
+#endif
 	NULL
 };
 



CVS commit: src/sys/uvm

2022-07-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul  7 13:27:02 UTC 2022

Modified Files:
src/sys/uvm: uvm_device.c

Log Message:
uvm: CTASSERT about MIN_PAGE_SIZE, which is constant.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/uvm/uvm_device.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/uvm/uvm_device.c
diff -u src/sys/uvm/uvm_device.c:1.79 src/sys/uvm/uvm_device.c:1.80
--- src/sys/uvm/uvm_device.c:1.79	Thu Jul  7 11:29:18 2022
+++ src/sys/uvm/uvm_device.c	Thu Jul  7 13:27:02 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_device.c,v 1.79 2022/07/07 11:29:18 rin Exp $	*/
+/*	$NetBSD: uvm_device.c,v 1.80 2022/07/07 13:27:02 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.79 2022/07/07 11:29:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.80 2022/07/07 13:27:02 riastradh Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -168,7 +168,7 @@ udv_attach(dev_t device, vm_prot_t acces
 			 *
 			 *	off += PAGE_SIZE - 2*(VOFF_MAX + 1).
 			 */
-			KASSERT(PAGE_SIZE >= 2);
+			CTASSERT(MIN_PAGE_SIZE >= 2);
 			off -= __type_max(voff_t);
 			off += PAGE_SIZE - 2;
 			off -= __type_max(voff_t);



CVS commit: src/sys/uvm

2022-07-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul  7 13:27:02 UTC 2022

Modified Files:
src/sys/uvm: uvm_device.c

Log Message:
uvm: CTASSERT about MIN_PAGE_SIZE, which is constant.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/uvm/uvm_device.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2022-07-07 Thread Rin Okuyama
Module Name:xsrc
Committed By:   rin
Date:   Thu Jul  7 12:56:01 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
Fix build for xorg-server 1.10, which doesn't have shadowUpdateAfb8().

For amiga, fall back to 1-bpp on xorg-server 1.10.

NFC for xorg-server 1.20 and higher.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.40 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.41
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.40	Thu Jul  7 11:48:16 2022
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Thu Jul  7 12:56:01 2022
@@ -579,6 +579,7 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags
 #endif
 #ifdef WSDISPLAY_TYPE_AMIGACC
 	if (wstype == WSDISPLAY_TYPE_AMIGACC) {
+#  if XORG_VERSION_CURRENT >= (1) * 1000 + (20) * 10
 		/*
 		 * Video memory is organized in bitplanes.
 		 * 8bpp or 1bpp supported in this driver.
@@ -588,7 +589,9 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags
 		 */
 		if (bitsperpixel == 8) {
 			fPtr->planarAfb = TRUE;
-		} else {
+		} else
+#  endif
+		{
 			default_depth = 1;
 			bitsperpixel = 1;
 		}
@@ -865,7 +868,13 @@ WsfbCreateScreenResources(ScreenPtr pScr
 	} else if (fPtr->rotate) {
 		shadowproc = shadowUpdateRotatePacked;
 	} else if (fPtr->planarAfb) {
+#if XORG_VERSION_CURRENT >= (1) * 1000 + (20) * 10
 		shadowproc = shadowUpdateAfb8;
+#else
+		xf86Msg(X_ERROR,
+		"Planar fb requires xorg-server 1.20 or higher.");
+		return FALSE;
+#endif
 		windowproc = WsfbWindowAfb;
 	} else
 		shadowproc = shadowUpdatePacked;



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2022-07-07 Thread Rin Okuyama
Module Name:xsrc
Committed By:   rin
Date:   Thu Jul  7 12:56:01 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
Fix build for xorg-server 1.10, which doesn't have shadowUpdateAfb8().

For amiga, fall back to 1-bpp on xorg-server 1.10.

NFC for xorg-server 1.20 and higher.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2022-07-07 Thread Rin Okuyama
Module Name:xsrc
Committed By:   rin
Date:   Thu Jul  7 11:48:17 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
For WSDISPLAY_TYPE_AMIGACC, no need to check ifdef __NetBSD__.

Note that similar block for WSDISPLAY_TYPE_LUNA should be guarded by
``#if defined(__NetBSD__) && defined(WSDISPLAY_TYPE_LUNA)'' on the
other hand; this is intended to distinguish NetBSD and OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.39 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.40
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.39	Thu Jul  7 11:42:27 2022
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Thu Jul  7 11:48:16 2022
@@ -577,7 +577,7 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags
 		bitsperpixel = 1;
 	}
 #endif
-#if defined(__NetBSD__) && defined(WSDISPLAY_TYPE_AMIGACC)
+#ifdef WSDISPLAY_TYPE_AMIGACC
 	if (wstype == WSDISPLAY_TYPE_AMIGACC) {
 		/*
 		 * Video memory is organized in bitplanes.



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2022-07-07 Thread Rin Okuyama
Module Name:xsrc
Committed By:   rin
Date:   Thu Jul  7 11:48:17 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
For WSDISPLAY_TYPE_AMIGACC, no need to check ifdef __NetBSD__.

Note that similar block for WSDISPLAY_TYPE_LUNA should be guarded by
``#if defined(__NetBSD__) && defined(WSDISPLAY_TYPE_LUNA)'' on the
other hand; this is intended to distinguish NetBSD and OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2022-07-07 Thread Rin Okuyama
Module Name:xsrc
Committed By:   rin
Date:   Thu Jul  7 11:42:28 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
Style. NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/xf86-video-wsfb/dist/src

2022-07-07 Thread Rin Okuyama
Module Name:xsrc
Committed By:   rin
Date:   Thu Jul  7 11:42:28 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
Style. NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 \
xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.38 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.39
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.38	Wed Jul  6 14:27:50 2022
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Thu Jul  7 11:42:27 2022
@@ -578,8 +578,7 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags
 	}
 #endif
 #if defined(__NetBSD__) && defined(WSDISPLAY_TYPE_AMIGACC)
-	if (wstype == WSDISPLAY_TYPE_AMIGACC)
-	{
+	if (wstype == WSDISPLAY_TYPE_AMIGACC) {
 		/*
 		 * Video memory is organized in bitplanes.
 		 * 8bpp or 1bpp supported in this driver.
@@ -1264,7 +1263,7 @@ WsfbWindowLinear(ScreenPtr pScreen, CARD
 	return ((CARD8 *)fPtr->fbstart + row * fPtr->fbi.fbi_stride + offset);
 }
 
-/**
+/*
  * For use with shadowUpdateAfb8
  *
  * For video memory layout with non-interleaved bitplanes.



CVS commit: src/sys/uvm

2022-07-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Jul  7 11:29:18 UTC 2022

Modified Files:
src/sys/uvm: uvm_device.c uvm_mmap.c

Log Message:
Convert CTASSERT(9) for PAGE_{SIZE,MASK} into KASSERT(9).

They are not compile-time constants for sparc.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/uvm/uvm_device.c
cvs rdiff -u -r1.183 -r1.184 src/sys/uvm/uvm_mmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2022-07-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Jul  7 11:29:18 UTC 2022

Modified Files:
src/sys/uvm: uvm_device.c uvm_mmap.c

Log Message:
Convert CTASSERT(9) for PAGE_{SIZE,MASK} into KASSERT(9).

They are not compile-time constants for sparc.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/uvm/uvm_device.c
cvs rdiff -u -r1.183 -r1.184 src/sys/uvm/uvm_mmap.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/uvm/uvm_device.c
diff -u src/sys/uvm/uvm_device.c:1.78 src/sys/uvm/uvm_device.c:1.79
--- src/sys/uvm/uvm_device.c:1.78	Wed Jul  6 13:52:24 2022
+++ src/sys/uvm/uvm_device.c	Thu Jul  7 11:29:18 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_device.c,v 1.78 2022/07/06 13:52:24 riastradh Exp $	*/
+/*	$NetBSD: uvm_device.c,v 1.79 2022/07/07 11:29:18 rin Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.78 2022/07/06 13:52:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.79 2022/07/07 11:29:18 rin Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -168,7 +168,7 @@ udv_attach(dev_t device, vm_prot_t acces
 			 *
 			 *	off += PAGE_SIZE - 2*(VOFF_MAX + 1).
 			 */
-			CTASSERT(PAGE_SIZE >= 2);
+			KASSERT(PAGE_SIZE >= 2);
 			off -= __type_max(voff_t);
 			off += PAGE_SIZE - 2;
 			off -= __type_max(voff_t);

Index: src/sys/uvm/uvm_mmap.c
diff -u src/sys/uvm/uvm_mmap.c:1.183 src/sys/uvm/uvm_mmap.c:1.184
--- src/sys/uvm/uvm_mmap.c:1.183	Wed Jul  6 01:12:46 2022
+++ src/sys/uvm/uvm_mmap.c	Thu Jul  7 11:29:18 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_mmap.c,v 1.183 2022/07/06 01:12:46 riastradh Exp $	*/
+/*	$NetBSD: uvm_mmap.c,v 1.184 2022/07/07 11:29:18 rin Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -46,7 +46,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.183 2022/07/06 01:12:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.184 2022/07/07 11:29:18 rin Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_pax.h"
@@ -314,8 +314,8 @@ sys_mmap(struct lwp *l, const struct sys
 	 */
 	pageoff = pos & PAGE_MASK;
 	pos -= pageoff;
-	CTASSERT(PAGE_MASK <= __type_max(vsize_t));
-	CTASSERT((__type_max(vsize_t) - PAGE_SIZE + 1) % PAGE_SIZE == 0);
+	KASSERT(PAGE_MASK <= __type_max(vsize_t));
+	KASSERT((__type_max(vsize_t) - PAGE_SIZE + 1) % PAGE_SIZE == 0);
 	if (size > __type_max(vsize_t) - PAGE_SIZE + 1 - pageoff)
 		return ENOMEM;
 	/*



Re: CVS commit: src/external/historical/nawk/bin

2022-07-07 Thread Valery Ushakov
On Wed, Jul 06, 2022 at 20:59:43 -, Christos Zoulas wrote:

> >> Thanks uwe! Are you planning to upstream all these changes?
> >
> >This is our mdocified bin/awk.1, upstream is dist/awk.1 that is
> >-man-old, so I'm not sure how to proceed.  Also most of the changes I
> >made are strictly mdoc related.  POSIX has quite a bit more elaborate
> >awk man page that spells out many details, importing some more of that
> >might be good but it's somewhat heavy, prescriptive prose and requires
> >some editing for better readibility, IMHO - not something I feel
> >qualified to do.
> 
> Ok thanks. I will check with upstream on replacing theirs with ours.

Not without some editorial efforts.  OpenBSD has their own additions
to the man page, e.g. documenting that literal space as FS value (the
default) is magic, etc.  It would be nice to collate those.  I don't
have a fresh FreBSD tree handy to check their version.

-uwe


CVS commit: src/sys/arch/mips/include

2022-07-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jul  7 10:06:02 UTC 2022

Modified Files:
src/sys/arch/mips/include: types.h

Log Message:
Add PRIuVSIZE


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/mips/include/types.h

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/include

2022-07-07 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jul  7 10:06:02 UTC 2022

Modified Files:
src/sys/arch/mips/include: types.h

Log Message:
Add PRIuVSIZE


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/mips/include/types.h

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/include/types.h
diff -u src/sys/arch/mips/include/types.h:1.76 src/sys/arch/mips/include/types.h:1.77
--- src/sys/arch/mips/include/types.h:1.76	Sat May 15 02:37:07 2021
+++ src/sys/arch/mips/include/types.h	Thu Jul  7 10:06:02 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.76 2021/05/15 02:37:07 simonb Exp $	*/
+/*	$NetBSD: types.h,v 1.77 2022/07/07 10:06:02 martin Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -87,12 +87,14 @@ typedef __uint64_t	vsize_t;
 #define	PRIxVADDR	PRIx64
 #define	PRIxVSIZE	PRIx64
 #define	PRIdVSIZE	PRId64
+#define	PRIuVSIZE	PRIu64
 #else
 typedef __uint32_t	vaddr_t;
 typedef __uint32_t	vsize_t;
 #define	PRIxVADDR	PRIx32
 #define	PRIxVSIZE	PRIx32
 #define	PRIdVSIZE	PRId32
+#define	PRIuVSIZE	PRIu32
 #endif
 
 typedef	vaddr_t	vm_offset_t;	/* deprecated (cddl/FreeBSD compat) */



CVS commit: src/sys/dev/scsipi

2022-07-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul  7 06:11:28 UTC 2022

Modified Files:
src/sys/dev/scsipi: if_se.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/scsipi/if_se.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/scsipi/if_se.c
diff -u src/sys/dev/scsipi/if_se.c:1.115 src/sys/dev/scsipi/if_se.c:1.116
--- src/sys/dev/scsipi/if_se.c:1.115	Sat Jan  1 10:32:29 2022
+++ src/sys/dev/scsipi/if_se.c	Thu Jul  7 06:11:28 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_se.c,v 1.115 2022/01/01 10:32:29 msaitoh Exp $	*/
+/*	$NetBSD: if_se.c,v 1.116 2022/07/07 06:11:28 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997 Ian W. Dall 
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.115 2022/01/01 10:32:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.116 2022/07/07 06:11:28 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -465,7 +465,7 @@ se_ifstart(struct ifnet *ifp)
 	if (!sc->sc_send_work_pending)  {
 		sc->sc_send_work_pending = true;
 		workqueue_enqueue(sc->sc_send_wq, >sc_send_work, NULL);
-	} 
+	}
 	/* else: nothing to do - work is already queued */
 	mutex_exit(>sc_iflock);
 }
@@ -915,7 +915,7 @@ se_init(struct se_softc *sc)
 			sc->sc_recv_work_pending = true;
 			workqueue_enqueue(sc->sc_recv_wq, >sc_recv_work,
 			NULL);
-		} 
+		}
 		mutex_exit(>sc_iflock);
 		ifp->if_flags &= ~IFF_OACTIVE;
 		mutex_enter(>sc_iflock);
@@ -923,7 +923,7 @@ se_init(struct se_softc *sc)
 			sc->sc_send_work_pending = true;
 			workqueue_enqueue(sc->sc_send_wq, >sc_send_work,
 			NULL);
-		} 
+		}
 		mutex_exit(>sc_iflock);
 	}
 	return (error);



CVS commit: src/sys/dev/scsipi

2022-07-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul  7 06:11:28 UTC 2022

Modified Files:
src/sys/dev/scsipi: if_se.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/scsipi/if_se.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/pci

2022-07-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul  7 06:11:19 UTC 2022

Modified Files:
src/sys/dev/pci: if_mcx.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/if_mcx.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_mcx.c
diff -u src/sys/dev/pci/if_mcx.c:1.23 src/sys/dev/pci/if_mcx.c:1.24
--- src/sys/dev/pci/if_mcx.c:1.23	Fri Nov  5 23:39:47 2021
+++ src/sys/dev/pci/if_mcx.c	Thu Jul  7 06:11:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mcx.c,v 1.23 2021/11/05 23:39:47 andvar Exp $ */
+/*	$NetBSD: if_mcx.c,v 1.24 2022/07/07 06:11:19 skrll Exp $ */
 /*	$OpenBSD: if_mcx.c,v 1.101 2021/06/02 19:16:11 patrick Exp $ */
 
 /*
@@ -23,7 +23,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.23 2021/11/05 23:39:47 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.24 2022/07/07 06:11:19 skrll Exp $");
 
 #include 
 #include 
@@ -4052,7 +4052,7 @@ mcx_hca_max_caps(struct mcx_softc *sc)
 	 */
 	sc->sc_bf_size = (1 << hca->log_bf_reg_size) / 2;
 	sc->sc_max_rqt_size = (1 << hca->log_max_rqt_size);
-	
+
 	if (hca->local_ca_ack_delay & MCX_CAP_DEVICE_MCAM_REG)
 		sc->sc_mcam_reg = 1;
 
@@ -8803,7 +8803,7 @@ mcx_kstat_queue_read(struct kstat *ks)
 	int error = 0;
 
 	KERNEL_LOCK();
-	
+
 	if (mcx_query_rq(sc, >q_rx, ) != 0) {
 		error = EIO;
 		goto out;



CVS commit: src/sys/dev/pci

2022-07-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul  7 06:11:19 UTC 2022

Modified Files:
src/sys/dev/pci: if_mcx.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/if_mcx.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/pci

2022-07-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul  7 06:11:08 UTC 2022

Modified Files:
src/sys/dev/pci: if_rge.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/if_rge.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/pci

2022-07-07 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul  7 06:11:08 UTC 2022

Modified Files:
src/sys/dev/pci: if_rge.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/if_rge.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_rge.c
diff -u src/sys/dev/pci/if_rge.c:1.22 src/sys/dev/pci/if_rge.c:1.23
--- src/sys/dev/pci/if_rge.c:1.22	Mon Oct 11 15:11:49 2021
+++ src/sys/dev/pci/if_rge.c	Thu Jul  7 06:11:08 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_rge.c,v 1.22 2021/10/11 15:11:49 msaitoh Exp $	*/
+/*	$NetBSD: if_rge.c,v 1.23 2022/07/07 06:11:08 skrll Exp $	*/
 /*	$OpenBSD: if_rge.c,v 1.9 2020/12/12 11:48:53 jan Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.22 2021/10/11 15:11:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.23 2022/07/07 06:11:08 skrll Exp $");
 
 #include 
 
@@ -841,7 +841,7 @@ rge_stop(struct ifnet *ifp, int disable)
 
 	if (disable) {
 		callout_halt(>sc_timeout, NULL);
-	} else 
+	} else
 		callout_stop(>sc_timeout);
 
 	ifp->if_timer = 0;
@@ -1771,11 +1771,11 @@ rge_phy_config_mac_cfg4(struct rge_softc
 	uint16_t val;
 	int i;
 	static const uint16_t mac_cfg4_b87c_value[] =
-	{ 0x8013, 0x0700, 0x8fb9, 0x2801, 0x8fba, 0x0100, 0x8fbc, 0x1900, 
-	  0x8fbe, 0xe100, 0x8fc0, 0x0800, 0x8fc2, 0xe500, 0x8fc4, 0x0f00, 
-	  0x8fc6, 0xf100, 0x8fc8, 0x0400, 0x8fca, 0xf300, 0x8fcc, 0xfd00, 
-	  0x8fce, 0xff00, 0x8fd0, 0xfb00, 0x8fd2, 0x0100, 0x8fd4, 0xf400, 
-	  0x8fd6, 0xff00, 0x8fd8, 0xf600, 0x813d, 0x390e, 0x814f, 0x790e, 
+	{ 0x8013, 0x0700, 0x8fb9, 0x2801, 0x8fba, 0x0100, 0x8fbc, 0x1900,
+	  0x8fbe, 0xe100, 0x8fc0, 0x0800, 0x8fc2, 0xe500, 0x8fc4, 0x0f00,
+	  0x8fc6, 0xf100, 0x8fc8, 0x0400, 0x8fca, 0xf300, 0x8fcc, 0xfd00,
+	  0x8fce, 0xff00, 0x8fd0, 0xfb00, 0x8fd2, 0x0100, 0x8fd4, 0xf400,
+	  0x8fd6, 0xff00, 0x8fd8, 0xf600, 0x813d, 0x390e, 0x814f, 0x790e,
 	  0x80b0, 0x0f31 };
 
 	for (i = 0; i < nitems(rtl8125_mac_cfg4_ephy); i++)
@@ -1924,8 +1924,8 @@ rge_phy_config_mac_cfg4(struct rge_softc
 	val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
 	rge_write_phy_ocp(sc, 0xa438, val | 0xc000);
 	rge_patch_phy_mcu(sc, 1);
-	RGE_PHY_CLRBIT(sc, 0xb896, 0x0001); 
-	RGE_PHY_CLRBIT(sc, 0xb892, 0xff00); 
+	RGE_PHY_CLRBIT(sc, 0xb896, 0x0001);
+	RGE_PHY_CLRBIT(sc, 0xb892, 0xff00);
 	rge_write_phy_ocp(sc, 0xb88e, 0xc23e);
 	rge_write_phy_ocp(sc, 0xb890, 0x);
 	rge_write_phy_ocp(sc, 0xb88e, 0xc240);
@@ -1940,10 +1940,10 @@ rge_phy_config_mac_cfg4(struct rge_softc
 	rge_write_phy_ocp(sc, 0xb890, 0x1012);
 	rge_write_phy_ocp(sc, 0xb88e, 0xc24a);
 	rge_write_phy_ocp(sc, 0xb890, 0x1416);
-	RGE_PHY_SETBIT(sc, 0xb896, 0x0001); 
+	RGE_PHY_SETBIT(sc, 0xb896, 0x0001);
 	rge_patch_phy_mcu(sc, 0);
-	RGE_PHY_SETBIT(sc, 0xa86a, 0x0001); 
-	RGE_PHY_SETBIT(sc, 0xa6f0, 0x0001); 
+	RGE_PHY_SETBIT(sc, 0xa86a, 0x0001);
+	RGE_PHY_SETBIT(sc, 0xa6f0, 0x0001);
 	rge_write_phy_ocp(sc, 0xbfa0, 0xd70d);
 	rge_write_phy_ocp(sc, 0xbfa2, 0x4100);
 	rge_write_phy_ocp(sc, 0xbfa4, 0xe868);
@@ -1951,7 +1951,7 @@ rge_phy_config_mac_cfg4(struct rge_softc
 	rge_write_phy_ocp(sc, 0xb54c, 0x3c18);
 	RGE_PHY_CLRBIT(sc, 0xbfa4, 0x0020);
 	rge_write_phy_ocp(sc, 0xa436, 0x817d);
-	RGE_PHY_SETBIT(sc, 0xa438, 0x1000); 
+	RGE_PHY_SETBIT(sc, 0xa438, 0x1000);
 }
 
 void