CVS commit: src/sys/dev

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:52:48 UTC 2021

Modified Files:
src/sys/dev/ic: mfi.c mfireg.h
src/sys/dev/pci/qat: qat.c
src/sys/dev/tc: tcdsreg.h

Log Message:
s/allign/align/


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/ic/mfi.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/mfireg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/qat/qat.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/tc/tcdsreg.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/dev/ic/mfi.c
diff -u src/sys/dev/ic/mfi.c:1.65 src/sys/dev/ic/mfi.c:1.66
--- src/sys/dev/ic/mfi.c:1.65	Sat Aug  7 16:19:12 2021
+++ src/sys/dev/ic/mfi.c	Sat Nov  6 06:52:48 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.65 2021/08/07 16:19:12 thorpej Exp $ */
+/* $NetBSD: mfi.c,v 1.66 2021/11/06 06:52:48 msaitoh Exp $ */
 /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
 
 /*
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.65 2021/08/07 16:19:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.66 2021/11/06 06:52:48 msaitoh Exp $");
 
 #include "bio.h"
 
@@ -1065,7 +1065,7 @@ mfi_attach(struct mfi_softc *sc, enum mf
 	if (sc->sc_ioptype == MFI_IOP_TBOLT) {
 		uint32_t tb_mem_size;
 		/* for Alignment */
-		tb_mem_size = MEGASAS_THUNDERBOLT_MSG_ALLIGNMENT;
+		tb_mem_size = MEGASAS_THUNDERBOLT_MSG_ALIGNMENT;
 
 		tb_mem_size +=
 		MEGASAS_THUNDERBOLT_NEW_MSG_SIZE * (sc->sc_max_cmds + 1);

Index: src/sys/dev/ic/mfireg.h
diff -u src/sys/dev/ic/mfireg.h:1.11 src/sys/dev/ic/mfireg.h:1.12
--- src/sys/dev/ic/mfireg.h:1.11	Sat Jul 24 21:31:37 2021
+++ src/sys/dev/ic/mfireg.h	Sat Nov  6 06:52:48 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: mfireg.h,v 1.11 2021/07/24 21:31:37 andvar Exp $ */
+/* $NetBSD: mfireg.h,v 1.12 2021/11/06 06:52:48 msaitoh Exp $ */
 /* $OpenBSD: mfireg.h,v 1.24 2006/06/19 19:05:45 marco Exp $ */
 /*
  * Copyright (c) 2006 Marco Peereboom 
@@ -159,7 +159,7 @@
  */
 #define MR_COMMAND_SIZE (MFI_FRAME_SIZE*20) /* 1280 bytes */
 
-#define MEGASAS_THUNDERBOLT_MSG_ALLIGNMENT	256
+#define MEGASAS_THUNDERBOLT_MSG_ALIGNMENT	256
 /*
  * We are defining only 128 byte message to reduce memory move over head
  * and also it will reduce the SRB extension size by 128byte compared with

Index: src/sys/dev/pci/qat/qat.c
diff -u src/sys/dev/pci/qat/qat.c:1.6 src/sys/dev/pci/qat/qat.c:1.7
--- src/sys/dev/pci/qat/qat.c:1.6	Sun Jun 14 23:23:12 2020
+++ src/sys/dev/pci/qat/qat.c	Sat Nov  6 06:52:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: qat.c,v 1.6 2020/06/14 23:23:12 riastradh Exp $	*/
+/*	$NetBSD: qat.c,v 1.7 2021/11/06 06:52:48 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2019 Internet Initiative Japan, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: qat.c,v 1.6 2020/06/14 23:23:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qat.c,v 1.7 2021/11/06 06:52:48 msaitoh Exp $");
 
 #include 
 #include 
@@ -1051,7 +1051,7 @@ qat_etr_setup_ring(struct qat_softc *sc,
 	qr->qr_ring_size = qat_etr_verify_ring_size(msg_size, num_msgs);
 
 	/*
-	 * To make sure that ring is alligned to ring size allocate
+	 * To make sure that ring is aligned to ring size allocate
 	 * at least 4k and then tell the user it is smaller.
 	 */
 	ring_size_bytes = QAT_SIZE_TO_RING_SIZE_IN_BYTES(qr->qr_ring_size);

Index: src/sys/dev/tc/tcdsreg.h
diff -u src/sys/dev/tc/tcdsreg.h:1.7 src/sys/dev/tc/tcdsreg.h:1.8
--- src/sys/dev/tc/tcdsreg.h:1.7	Sun Dec 11 12:24:00 2005
+++ src/sys/dev/tc/tcdsreg.h	Sat Nov  6 06:52:48 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tcdsreg.h,v 1.7 2005/12/11 12:24:00 christos Exp $ */
+/* $NetBSD: tcdsreg.h,v 1.8 2021/11/06 06:52:48 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -197,14 +197,14 @@ void tcds_scsi_reset(int);
 
 #define KN15AA_REG_SCSI_IMER	(KN15AA_SYS_SCSI + 0x80008)
 
-/* these are the bits that were unalligned at the beginning of the DMA */
+/* these are the bits that were unaligned at the beginning of the DMA */
 #define KN15AA_REG_SCSI_DUDB0	(KN15AA_SYS_SCSI + 0x82010)
 #define KN15AA_REG_SCSI_DUDB1	(KN15AA_SYS_SCSI + 0x82210)
 #	define SCSI_DUDB_MASK01	0x0001 /* Mask bit for byte[01] */
 #	define SCSI_DUDB_MASK10	0x0002 /* Mask bit for byte[10] */
 #	define SCSI_DUDB_MASK11	0x0004 /* Mask bit for byte[11] */
 
-/* these are the bits that were unalligned at the end of the DMA */
+/* these are the bits that were unaligned at the end of the DMA */
 #define KN15AA_REG_SCSI_DUDE0	(KN15AA_SYS_SCSI + 0x82018)
 #define KN15AA_REG_SCSI_DUDE1	(KN15AA_SYS_SCSI + 0x82218)
 #	define SCSI_DUDE_MASK00	0x100 /* Mask bit for byte[00] */



CVS commit: src/sys/dev

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:52:48 UTC 2021

Modified Files:
src/sys/dev/ic: mfi.c mfireg.h
src/sys/dev/pci/qat: qat.c
src/sys/dev/tc: tcdsreg.h

Log Message:
s/allign/align/


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/ic/mfi.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/mfireg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/qat/qat.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/tc/tcdsreg.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/mips

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:49:02 UTC 2021

Modified Files:
src/sys/arch/mips/mips: cache_tx39.c

Log Message:
Fix typo in comment. s/phyiscally/physically/


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/mips/cache_tx39.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/mips/cache_tx39.c
diff -u src/sys/arch/mips/mips/cache_tx39.c:1.8 src/sys/arch/mips/mips/cache_tx39.c:1.9
--- src/sys/arch/mips/mips/cache_tx39.c:1.8	Mon Jul 11 16:15:36 2016
+++ src/sys/arch/mips/mips/cache_tx39.c	Sat Nov  6 06:49:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache_tx39.c,v 1.8 2016/07/11 16:15:36 matt Exp $	*/
+/*	$NetBSD: cache_tx39.c,v 1.9 2021/11/06 06:49:02 msaitoh Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cache_tx39.c,v 1.8 2016/07/11 16:15:36 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cache_tx39.c,v 1.9 2021/11/06 06:49:02 msaitoh Exp $");
 
 #include 
 
@@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: cache_tx39.c
  *	- I-cache direct-mapped (TX3900) or 2-way set-associative (TX3920)
  *	- D-cache 2-way set-associative
  *	- Write-through (TX3900, TX3920) or write-back (TX3920)
- *	- Physically indexed, phyiscally tagged
+ *	- Physically indexed, physically tagged
  *
  * XXX THIS IS NOT YET COMPLETE.
  */



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

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:49:02 UTC 2021

Modified Files:
src/sys/arch/mips/mips: cache_tx39.c

Log Message:
Fix typo in comment. s/phyiscally/physically/


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/mips/cache_tx39.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

2021-11-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  6 06:44:42 UTC 2021

Modified Files:
src/sys/dev/usb: usb_subr.c

Log Message:
USB style. NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/sys/dev/usb/usb_subr.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/usb_subr.c
diff -u src/sys/dev/usb/usb_subr.c:1.268 src/sys/dev/usb/usb_subr.c:1.269
--- src/sys/dev/usb/usb_subr.c:1.268	Sat Nov  6 06:41:02 2021
+++ src/sys/dev/usb/usb_subr.c	Sat Nov  6 06:44:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_subr.c,v 1.268 2021/11/06 06:41:02 skrll Exp $	*/
+/*	$NetBSD: usb_subr.c,v 1.269 2021/11/06 06:44:42 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.268 2021/11/06 06:41:02 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.269 2021/11/06 06:44:42 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -362,7 +362,7 @@ usbd_find_idesc(usb_config_descriptor_t 
 
 usb_endpoint_descriptor_t *
 usbd_find_edesc(usb_config_descriptor_t *cd, int ifaceidx, int altidx,
-		int endptidx)
+int endptidx)
 {
 	char *p = (char *)cd;
 	char *end = p + UGETW(cd->wTotalLength);
@@ -1093,7 +1093,7 @@ usbd_properties(device_t dv, struct usbd
 
 static usbd_status
 usbd_attachwholedevice(device_t parent, struct usbd_device *dev, int port,
-	int usegeneric)
+int usegeneric)
 {
 	struct usb_attach_arg uaa;
 	usb_device_descriptor_t *dd = &dev->ud_ddesc;
@@ -1141,7 +1141,7 @@ usbd_attachwholedevice(device_t parent, 
 
 static usbd_status
 usbd_attachinterfaces(device_t parent, struct usbd_device *dev,
-		  int port, const int *locators)
+int port, const int *locators)
 {
 	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
 	struct usbif_attach_arg uiaa;
@@ -1235,7 +1235,7 @@ usbd_attachinterfaces(device_t parent, s
 
 usbd_status
 usbd_probe_and_attach(device_t parent, struct usbd_device *dev,
-  int port, int addr)
+int port, int addr)
 {
 	USBHIST_FUNC();
 	USBHIST_CALLARGS(usbdebug, "trying device specific drivers", 0, 0, 0, 0);
@@ -1305,7 +1305,7 @@ usbd_probe_and_attach(device_t parent, s
  */
 usbd_status
 usbd_reattach_device(device_t parent, struct usbd_device *dev,
- int port, const int *locators)
+int port, const int *locators)
 {
 	int i, loc;
 



CVS commit: src/sys/dev/usb

2021-11-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  6 06:44:42 UTC 2021

Modified Files:
src/sys/dev/usb: usb_subr.c

Log Message:
USB style. NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/sys/dev/usb/usb_subr.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

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:44:41 UTC 2021

Modified Files:
src/sys/dev/ic: ath.c
src/sys/dev/usb: usbcdc.h

Log Message:
Fix typo in comment. s/notifcation/notification/


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/dev/ic/ath.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/usbcdc.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/dev/ic/ath.c
diff -u src/sys/dev/ic/ath.c:1.137 src/sys/dev/ic/ath.c:1.138
--- src/sys/dev/ic/ath.c:1.137	Tue Sep 21 14:41:28 2021
+++ src/sys/dev/ic/ath.c	Sat Nov  6 06:44:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ath.c,v 1.137 2021/09/21 14:41:28 christos Exp $	*/
+/*	$NetBSD: ath.c,v 1.138 2021/11/06 06:44:41 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -41,7 +41,7 @@
 __FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $");
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.137 2021/09/21 14:41:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.138 2021/11/06 06:44:41 msaitoh Exp $");
 #endif
 
 /*
@@ -3150,7 +3150,7 @@ ath_rx_proc(void *arg, int npending)
 sc->sc_stats.ast_rx_badmic++;
 /*
  * Do minimal work required to hand off
- * the 802.11 header for notifcation.
+ * the 802.11 header for notification.
  */
 /* XXX frag's and qos frames */
 len = ds->ds_rxstat.rs_datalen;

Index: src/sys/dev/usb/usbcdc.h
diff -u src/sys/dev/usb/usbcdc.h:1.11 src/sys/dev/usb/usbcdc.h:1.12
--- src/sys/dev/usb/usbcdc.h:1.11	Mon Apr 28 20:24:00 2008
+++ src/sys/dev/usb/usbcdc.h	Sat Nov  6 06:44:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbcdc.h,v 1.11 2008/04/28 20:24:00 martin Exp $	*/
+/*	$NetBSD: usbcdc.h,v 1.12 2021/11/06 06:44:41 msaitoh Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usbcdc.h,v 1.7 1999/11/17 22:33:48 n_hibma Exp $	*/
 
 /*
@@ -158,7 +158,7 @@ typedef struct {
 #define UCDC_NOTIFICATION_LENGTH 8
 
 /*
- * Bits set in the SERIAL STATE notifcation (first byte of data)
+ * Bits set in the SERIAL STATE notification (first byte of data)
  */
 
 #define UCDC_N_SERIAL_OVERRUN		0x40



CVS commit: src/sys/dev

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:44:41 UTC 2021

Modified Files:
src/sys/dev/ic: ath.c
src/sys/dev/usb: usbcdc.h

Log Message:
Fix typo in comment. s/notifcation/notification/


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/dev/ic/ath.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/usbcdc.h

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

2021-11-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  6 06:41:02 UTC 2021

Modified Files:
src/sys/dev/usb: usb_subr.c

Log Message:
config_pending_incr doesn't need KERNEL_LOCK protection


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/dev/usb/usb_subr.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/usb_subr.c
diff -u src/sys/dev/usb/usb_subr.c:1.267 src/sys/dev/usb/usb_subr.c:1.268
--- src/sys/dev/usb/usb_subr.c:1.267	Tue Sep  7 10:44:18 2021
+++ src/sys/dev/usb/usb_subr.c	Sat Nov  6 06:41:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_subr.c,v 1.267 2021/09/07 10:44:18 riastradh Exp $	*/
+/*	$NetBSD: usb_subr.c,v 1.268 2021/11/06 06:41:02 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.267 2021/09/07 10:44:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.268 2021/11/06 06:41:02 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1120,8 +1120,9 @@ usbd_attachwholedevice(device_t parent, 
 	dlocs[USBDEVIFCF_CONFIGURATION] = -1;
 	dlocs[USBDEVIFCF_INTERFACE] = -1;
 
-	KERNEL_LOCK(1, curlwp);
 	config_pending_incr(parent);
+
+	KERNEL_LOCK(1, curlwp);
 	dv = config_found(parent, &uaa, usbd_print,
 			  CFARGS(.submatch = config_stdsubmatch,
  .iattr = "usbdevif",



CVS commit: src/sys/dev/usb

2021-11-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  6 06:41:02 UTC 2021

Modified Files:
src/sys/dev/usb: usb_subr.c

Log Message:
config_pending_incr doesn't need KERNEL_LOCK protection


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/dev/usb/usb_subr.c

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



CVS commit: src

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:40:33 UTC 2021

Modified Files:
src/bin/ksh: shf.c
src/usr.sbin/sysinst: partman.c

Log Message:
s/writting/writing/


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/bin/ksh/shf.c
cvs rdiff -u -r1.53 -r1.54 src/usr.sbin/sysinst/partman.c

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

Modified files:

Index: src/bin/ksh/shf.c
diff -u src/bin/ksh/shf.c:1.14 src/bin/ksh/shf.c:1.15
--- src/bin/ksh/shf.c:1.14	Thu Sep 16 19:44:01 2021
+++ src/bin/ksh/shf.c	Sat Nov  6 06:40:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: shf.c,v 1.14 2021/09/16 19:44:01 christos Exp $	*/
+/*	$NetBSD: shf.c,v 1.15 2021/11/06 06:40:33 msaitoh Exp $	*/
 
 /*
  *  Shell file I/O routines
@@ -6,7 +6,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: shf.c,v 1.14 2021/09/16 19:44:01 christos Exp $");
+__RCSID("$NetBSD: shf.c,v 1.15 2021/11/06 06:40:33 msaitoh Exp $");
 #endif
 
 #include 
@@ -709,7 +709,7 @@ shf_write(buf, nbytes, shf)
 	if (nbytes < 0)
 		internal_errorf(1, "shf_write: nbytes %d", nbytes);
 
-	/* Don't buffer if buffer is empty and we're writting a large amount. */
+	/* Don't buffer if buffer is empty and we're writing a large amount. */
 	if ((ncopy = shf->wnleft)
 	&& (shf->wp != shf->buf || nbytes < shf->wnleft))
 	{

Index: src/usr.sbin/sysinst/partman.c
diff -u src/usr.sbin/sysinst/partman.c:1.53 src/usr.sbin/sysinst/partman.c:1.54
--- src/usr.sbin/sysinst/partman.c:1.53	Tue Sep 14 21:45:20 2021
+++ src/usr.sbin/sysinst/partman.c	Sat Nov  6 06:40:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: partman.c,v 1.53 2021/09/14 21:45:20 rillig Exp $ */
+/*	$NetBSD: partman.c,v 1.54 2021/11/06 06:40:33 msaitoh Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -2725,7 +2725,7 @@ pm_savebootsector(void)
 if (run_program(RUN_DISPLAY | RUN_PROGRESS,
 	"raidctl -v -A root %s", pm_i->diskdev) != 0) {
 	if (logfp)
-		fprintf(logfp, "Error writting RAID bootsector to %s\n",
+		fprintf(logfp, "Error writing RAID bootsector to %s\n",
 			pm_i->diskdev);
 	continue;
 }
@@ -2735,7 +2735,7 @@ pm_savebootsector(void)
 	"gpt biosboot -i %d %s",
 	pm_i->rootpart + 1, pm_i->diskdev) != 0) {
 			 		if (logfp)
-		fprintf(logfp, "Error writting GPT bootsector to %s\n",
+		fprintf(logfp, "Error writing GPT bootsector to %s\n",
 			pm_i->diskdev);
 	continue;
 }
@@ -2747,7 +2747,7 @@ pm_savebootsector(void)
 #endif
 md_post_newfs() != 0) {
 		 			if (logfp)
-		fprintf(logfp, "Error writting bootsector to %s\n",
+		fprintf(logfp, "Error writing bootsector to %s\n",
 			pm_i->diskdev);
 	continue;
 }



CVS commit: src

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:40:33 UTC 2021

Modified Files:
src/bin/ksh: shf.c
src/usr.sbin/sysinst: partman.c

Log Message:
s/writting/writing/


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/bin/ksh/shf.c
cvs rdiff -u -r1.53 -r1.54 src/usr.sbin/sysinst/partman.c

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



CVS commit: src/bin/ps

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:38:03 UTC 2021

Modified Files:
src/bin/ps: ps.1

Log Message:
s/maxiumum/maximum/


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/bin/ps/ps.1

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

Modified files:

Index: src/bin/ps/ps.1
diff -u src/bin/ps/ps.1:1.114 src/bin/ps/ps.1:1.115
--- src/bin/ps/ps.1:1.114	Tue Sep 14 22:14:11 2021
+++ src/bin/ps/ps.1	Sat Nov  6 06:38:03 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ps.1,v 1.114 2021/09/14 22:14:11 christos Exp $
+.\"	$NetBSD: ps.1,v 1.115 2021/11/06 06:38:03 msaitoh Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1991, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)ps.1	8.3 (Berkeley) 4/18/94
 .\"
-.Dd September 14, 2021
+.Dd November 6, 2021
 .Dt PS 1
 .Os
 .Sh NAME
@@ -329,7 +329,7 @@ The exact time the command started, usin
 format described in
 .Xr strftime 3 .
 .It Ar maxrss
-the maxiumum resident set size of the process (in 1024 byte units).
+the maximum resident set size of the process (in 1024 byte units).
 .It Ar nice
 The process scheduling increment (see
 .Xr setpriority 2 ) .



CVS commit: src/bin/ps

2021-11-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  6 06:38:03 UTC 2021

Modified Files:
src/bin/ps: ps.1

Log Message:
s/maxiumum/maximum/


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/bin/ps/ps.1

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



CVS commit: src/bin/pax

2021-11-05 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sat Nov  6 01:19:19 UTC 2021

Modified Files:
src/bin/pax: pax.1

Log Message:
pax.1: minor grammar fixes


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/bin/pax/pax.1

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

Modified files:

Index: src/bin/pax/pax.1
diff -u src/bin/pax/pax.1:1.71 src/bin/pax/pax.1:1.72
--- src/bin/pax/pax.1:1.71	Tue Mar 19 00:36:14 2019
+++ src/bin/pax/pax.1	Sat Nov  6 01:19:19 2021
@@ -1,4 +1,4 @@
-.\"$NetBSD: pax.1,v 1.71 2019/03/19 00:36:14 gutteridge Exp $
+.\"$NetBSD: pax.1,v 1.72 2021/11/06 01:19:19 gutteridge Exp $
 .\"
 .\" Copyright (c) 1992 Keith Muller.
 .\" Copyright (c) 1992, 1993
@@ -489,7 +489,7 @@ Multiple characteristics can be concaten
 and multiple
 .Fl p
 options can be specified.
-The meaning of the specification characters are as follows:
+The meanings of the specification characters are as follows:
 .Bl -tag -width 2n
 .It Cm a
 Do not preserve file access times.
@@ -571,7 +571,7 @@ operands according to the substitution e
 using the syntax of the
 .Xr ed 1
 utility regular expressions.
-The format of these regular expressions are:
+The format of these regular expressions is:
 .Dl /old/new/[gps]
 As in
 .Xr ed 1 ,



CVS commit: src/bin/pax

2021-11-05 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sat Nov  6 01:19:19 UTC 2021

Modified Files:
src/bin/pax: pax.1

Log Message:
pax.1: minor grammar fixes


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/bin/pax/pax.1

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



Re: CVS commit: src

2021-11-05 Thread Joerg Sonnenberger
On Thu, Nov 04, 2021 at 06:17:20PM -0700, Alistair Crooks wrote:
> I think you're misreading the diff - it will only wrap if the minimum size
> is 0x, which is...ummm...highly unlikely (it's defined to be 0
> right now, the type is unsigned)

I'm not so much worried about the constant, but the right hand size.
Without looking at the types, I can't be sure that "context->pwdlen + 1"
doesn't overflow or that "context->m_cost - 1" can't underflow. Much
easier and safer to just use a type cast...

Joerg


CVS commit: src/sys/dev/pci

2021-11-05 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Nov  5 23:39:47 UTC 2021

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

Log Message:
mcx(4): ensure that RQT size is always a power of two.
Fixes PR kern/56484.
Thanks riastradh for the power of two patch :). OK: mrg, jmcneill, riastradh.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 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

2021-11-05 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Nov  5 23:39:47 UTC 2021

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

Log Message:
mcx(4): ensure that RQT size is always a power of two.
Fixes PR kern/56484.
Thanks riastradh for the power of two patch :). OK: mrg, jmcneill, riastradh.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 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.22 src/sys/dev/pci/if_mcx.c:1.23
--- src/sys/dev/pci/if_mcx.c:1.22	Sun Sep 26 20:14:07 2021
+++ src/sys/dev/pci/if_mcx.c	Fri Nov  5 23:39:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mcx.c,v 1.22 2021/09/26 20:14:07 jmcneill Exp $ */
+/*	$NetBSD: if_mcx.c,v 1.23 2021/11/05 23:39:47 andvar 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.22 2021/09/26 20:14:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.23 2021/11/05 23:39:47 andvar Exp $");
 
 #include 
 #include 
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -2956,6 +2957,8 @@ mcx_attach(device_t parent, device_t sel
 
 	sc->sc_nqueues = uimin(MCX_MAX_QUEUES, msix);
 	sc->sc_nqueues = uimin(sc->sc_nqueues, ncpu);
+	/* Round down to a power of two.  */
+	sc->sc_nqueues = 1U << ilog2(sc->sc_nqueues);
 	sc->sc_queues = kmem_zalloc(sc->sc_nqueues * sizeof(*sc->sc_queues),
 	KM_SLEEP);
 



CVS commit: src/share/man/man3

2021-11-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Nov  5 22:39:36 UTC 2021

Modified Files:
src/share/man/man3: ilog2.3

Log Message:
Rework ilog2(3) man page.

- Tweak title.
- Clarify semantics -- round down, not any other way.
- xref ffs(3)
- Fix return type: int.
- Fix language about input type.
  . Any unsigned type is fine.
  . Types smaller than uint32_t will be safely converted to uint32_t.
- Note that it is a constant expression if x is constant.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man3/ilog2.3

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/man3/ilog2.3
diff -u src/share/man/man3/ilog2.3:1.5 src/share/man/man3/ilog2.3:1.6
--- src/share/man/man3/ilog2.3:1.5	Tue May 10 06:39:45 2011
+++ src/share/man/man3/ilog2.3	Fri Nov  5 22:39:35 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: ilog2.3,v 1.5 2011/05/10 06:39:45 jruoho Exp $ $
+.\" $NetBSD: ilog2.3,v 1.6 2021/11/05 22:39:35 riastradh Exp $ $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,34 +27,53 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 10, 2011
+.Dd November 5, 2021
 .Dt ILOG2 3
 .Os
 .Sh NAME
 .Nm ilog2
-.Nd integer logarithm
+.Nd integer base-2 logarithm
 .Sh SYNOPSIS
 .In sys/bitops.h
-.Ft size
+.Ft int
 .Fn ilog2 "size x"
 .Sh DESCRIPTION
-The
+For positive
+.Fa x ,
+the
 .Fn ilog2
-macro returns an integer (binary) logarithm of
-.Fa x .
-It is the logarithm for base 2; the binary logarithm of
-.Fa x
-is the power to which the number 2 must be raised to obtain the value
+macro returns the integer part of the base-2 logarithm of
+.Fa x ;
+that is,
+.Fo floor
+.Fn log_2 x
+.Fc .
+If
+.Fa n Li = Fn ilog2 x ,
+then
+.Fa n
+is the largest integer such that
+.No 2** Ns Fa n Li <= Fa x ;
+in other words,
+.Fn ilog2
+returns the largest integer to which 2 can be raised to obtain a value
+at most
 .Fa x .
 .Pp
-The type of the input parameter should be either
-.Vt uint32_t
-or
-.Vt uint64_t .
+The type of the input parameter must be unsigned.
+.Pp
+If
+.Fa x
+is a constant expression, then so is
+.Fn ilog2 x .
 .Sh ERRORS
-A value \-1 is returned on error.
+.Fn ilog2
+returns \-1 when
+.Fa x
+is zero.
 .Sh SEE ALSO
 .Xr bitops 3 ,
+.Xr ffs 3 ,
 .Xr ilogb 3 ,
 .Xr log2 3 ,
 .Xr imax 9 ,



CVS commit: src/share/man/man3

2021-11-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Nov  5 22:39:36 UTC 2021

Modified Files:
src/share/man/man3: ilog2.3

Log Message:
Rework ilog2(3) man page.

- Tweak title.
- Clarify semantics -- round down, not any other way.
- xref ffs(3)
- Fix return type: int.
- Fix language about input type.
  . Any unsigned type is fine.
  . Types smaller than uint32_t will be safely converted to uint32_t.
- Note that it is a constant expression if x is constant.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man3/ilog2.3

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



CVS commit: src/usr.bin/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 22:06:43 UTC 2021

Modified Files:
src/usr.bin/indent: lexi.c

Log Message:
indent: consistently use token.e[-1] for the last added character

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/usr.bin/indent/lexi.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/indent/lexi.c
diff -u src/usr.bin/indent/lexi.c:1.131 src/usr.bin/indent/lexi.c:1.132
--- src/usr.bin/indent/lexi.c:1.131	Fri Nov  5 21:08:04 2021
+++ src/usr.bin/indent/lexi.c	Fri Nov  5 22:06:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lexi.c,v 1.131 2021/11/05 21:08:04 rillig Exp $	*/
+/*	$NetBSD: lexi.c,v 1.132 2021/11/05 22:06:43 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)lexi.c	8.1 (
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: lexi.c,v 1.131 2021/11/05 21:08:04 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.132 2021/11/05 22:06:43 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/lexi.c 337862 2018-08-15 18:19:45Z pstef $");
 #endif
@@ -394,7 +394,7 @@ lex_word(void)
 static void
 lex_char_or_string(void)
 {
-for (char delim = *token.s;;) {
+for (char delim = token.e[-1];;) {
 	if (*inp.s == '\n') {
 	diag(1, "Unterminated literal");
 	return;
@@ -576,7 +576,7 @@ lexi(void)
 bool unary_delim = false;	/* whether the current token forces a
  * following operator to be unary */
 
-switch (*token.s) {
+switch (token.e[-1]) {
 case '\n':
 	unary_delim = ps.next_unary;
 	ps.next_col_1 = true;
@@ -652,7 +652,7 @@ lexi(void)
 	lsym = ps.next_unary ? lsym_unary_op : lsym_binary_op;
 	unary_delim = true;
 
-	if (*inp.s == token.s[0]) {	/* ++, -- */
+	if (*inp.s == token.e[-1]) {	/* ++, -- */
 	*token.e++ = *inp.s++;
 	if (ps.prev_token == lsym_ident ||
 		ps.prev_token == lsym_rparen_or_rbracket) {
@@ -724,25 +724,22 @@ lexi(void)
 	break;
 
 default:
-	if (token.s[0] == '/' && (*inp.s == '*' || *inp.s == '/')) {
-	/* it is start of comment */
+	if (token.e[-1] == '/' && (*inp.s == '*' || *inp.s == '/')) {
 	*token.e++ = inbuf_next();
-
 	lsym = lsym_comment;
 	unary_delim = ps.next_unary;
 	break;
 	}
 
-	while (token.e[-1] == *inp.s || *inp.s == '=') {
-	/* handle '||', '&&', etc., and also things as in 'int *i' */
+	/* handle '||', '&&', etc., and also things as in 'int *i' */
+	while (token.e[-1] == *inp.s || *inp.s == '=')
 	token_add_char(inbuf_next());
-	}
 
 	lsym = ps.next_unary ? lsym_unary_op : lsym_binary_op;
 	unary_delim = true;
 }
 
-if (inp.s >= inp.e)		/* check for input buffer empty */
+if (inp.s >= inp.e)
 	inbuf_read_line();
 
 ps.next_unary = unary_delim;



CVS commit: src/usr.bin/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 22:06:43 UTC 2021

Modified Files:
src/usr.bin/indent: lexi.c

Log Message:
indent: consistently use token.e[-1] for the last added character

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/usr.bin/indent/lexi.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/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 21:52:17 UTC 2021

Modified Files:
src/usr.bin/indent: args.c

Log Message:
indent: clean up argument parsing

In struct pro, place the dependent member below its dependency.

In load_profile, consistently use -1 when outside a comment.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/usr.bin/indent/args.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/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 21:52:17 UTC 2021

Modified Files:
src/usr.bin/indent: args.c

Log Message:
indent: clean up argument parsing

In struct pro, place the dependent member below its dependency.

In load_profile, consistently use -1 when outside a comment.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/usr.bin/indent/args.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/indent/args.c
diff -u src/usr.bin/indent/args.c:1.68 src/usr.bin/indent/args.c:1.69
--- src/usr.bin/indent/args.c:1.68	Sun Oct 31 22:38:12 2021
+++ src/usr.bin/indent/args.c	Fri Nov  5 21:52:17 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: args.c,v 1.68 2021/10/31 22:38:12 rillig Exp $	*/
+/*	$NetBSD: args.c,v 1.69 2021/11/05 21:52:17 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)args.c	8.1 (
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: args.c,v 1.68 2021/10/31 22:38:12 rillig Exp $");
+__RCSID("$NetBSD: args.c,v 1.69 2021/11/05 21:52:17 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/args.c 336318 2018-07-15 21:04:21Z pstef $");
 #endif
@@ -66,9 +66,9 @@ __FBSDID("$FreeBSD: head/usr.bin/indent/
 #endif
 
 #define bool_option(name, value, var) \
-	{name, true, value, false, 0, 0, assert_type(&(opt.var), bool *)}
+	{name, true, false, value, 0, 0, assert_type(&(opt.var), bool *)}
 #define bool_options(name, var) \
-	{name, true, false, true, 0, 0, assert_type(&(opt.var), bool *)}
+	{name, true, true, false, 0, 0, assert_type(&(opt.var), bool *)}
 #define int_option(name, var, min, max) \
 	{name, false, false, false, min, max, assert_type(&(opt.var), int *)}
 
@@ -76,8 +76,8 @@ __FBSDID("$FreeBSD: head/usr.bin/indent/
 static const struct pro {
 const char p_name[5];	/* e.g. "bl", "cli" */
 bool p_is_bool;
-bool p_bool_value;
 bool p_may_negate;
+bool p_bool_value;		/* only relevant if !p_may_negate */
 short i_min;
 short i_max;
 void *p_var;		/* the associated variable */
@@ -272,10 +272,10 @@ load_profile(const char *fname, bool mus
 	int ch, comment_ch = -1;
 
 	while ((ch = getc(f)) != EOF) {
-	if (ch == '*' && comment_ch < 0 && n > 0 && buf[n - 1] == '/') {
+	if (ch == '*' && comment_ch == -1 && n > 0 && buf[n - 1] == '/') {
 		n--;
-		comment_ch = ch;
-	} else if (comment_ch >= 0) {
+		comment_ch = '*';
+	} else if (comment_ch != -1) {
 		comment_ch = ch == '/' && comment_ch == '*' ? -1 : ch;
 	} else if (isspace((unsigned char)ch)) {
 		break;



CVS commit: src/usr.bin/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 21:39:12 UTC 2021

Modified Files:
src/usr.bin/indent: indent.h io.c

Log Message:
indent: the '+ 1' in dump_line_code is not an off-by-one error


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.114 -r1.115 src/usr.bin/indent/io.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/indent/indent.h
diff -u src/usr.bin/indent/indent.h:1.77 src/usr.bin/indent/indent.h:1.78
--- src/usr.bin/indent/indent.h:1.77	Fri Nov  5 19:33:28 2021
+++ src/usr.bin/indent/indent.h	Fri Nov  5 21:39:12 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.h,v 1.77 2021/11/05 19:33:28 rillig Exp $	*/
+/*	$NetBSD: indent.h,v 1.78 2021/11/05 21:39:12 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -283,7 +283,8 @@ extern struct parser_state {
  * statement */
 short paren_indents[20];	/* indentation of the operand/argument of each
  * level of parentheses or brackets, relative
- * to the enclosing statement */
+ * to the enclosing statement; if negative,
+ * reflected at -1 */
 int cast_mask;		/* indicates which close parentheses
  * potentially close off casts */
 int not_cast_mask;		/* indicates which close parentheses

Index: src/usr.bin/indent/io.c
diff -u src/usr.bin/indent/io.c:1.114 src/usr.bin/indent/io.c:1.115
--- src/usr.bin/indent/io.c:1.114	Thu Nov  4 19:23:57 2021
+++ src/usr.bin/indent/io.c	Fri Nov  5 21:39:12 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: io.c,v 1.114 2021/11/04 19:23:57 rillig Exp $	*/
+/*	$NetBSD: io.c,v 1.115 2021/11/05 21:39:12 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)io.c	8.1 (Be
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: io.c,v 1.114 2021/11/04 19:23:57 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.115 2021/11/05 21:39:12 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $");
 #endif
@@ -150,8 +150,7 @@ dump_line_code(int ind)
 for (int i = 0; i < ps.p_l_follow; i++) {
 	if (ps.paren_indents[i] >= 0) {
 	int paren_ind = ps.paren_indents[i];
-	/* XXX: the '+ 1' smells like an off-by-one error. */
-	ps.paren_indents[i] = (short)-(paren_ind + target_ind + 1);
+	ps.paren_indents[i] = (short)(-1 - (paren_ind + target_ind));
 	debug_println(
 		"setting paren_indents[%d] from %d to %d for column %d",
 		i, paren_ind, ps.paren_indents[i], target_ind + 1);



CVS commit: src/usr.bin/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 21:39:12 UTC 2021

Modified Files:
src/usr.bin/indent: indent.h io.c

Log Message:
indent: the '+ 1' in dump_line_code is not an off-by-one error


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.114 -r1.115 src/usr.bin/indent/io.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/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 21:08:04 UTC 2021

Modified Files:
src/usr.bin/indent: lexi.c

Log Message:
indent: add debug output for remaining members of parser_status


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/usr.bin/indent/lexi.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/indent/lexi.c
diff -u src/usr.bin/indent/lexi.c:1.130 src/usr.bin/indent/lexi.c:1.131
--- src/usr.bin/indent/lexi.c:1.130	Fri Nov  5 19:33:28 2021
+++ src/usr.bin/indent/lexi.c	Fri Nov  5 21:08:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lexi.c,v 1.130 2021/11/05 19:33:28 rillig Exp $	*/
+/*	$NetBSD: lexi.c,v 1.131 2021/11/05 21:08:04 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)lexi.c	8.1 (
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: lexi.c,v 1.130 2021/11/05 19:33:28 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.131 2021/11/05 21:08:04 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/lexi.c 337862 2018-08-15 18:19:45Z pstef $");
 #endif
@@ -297,11 +297,17 @@ debug_lexi(lexer_symbol lsym)
 debug_ps_bool(next_col_1);
 debug_ps_bool(curr_col_1);
 debug_ps_bool(next_unary);
-// procname
+if (strcmp(ps.procname, prev_ps.procname) != 0)
+	debug_println("ps.procname = '%s'", ps.procname);
 debug_ps_bool(want_blank);
 debug_ps_int(paren_level);
 debug_ps_int(p_l_follow);
-// paren_indents
+if (ps.paren_level != prev_ps.paren_level) {
+	debug_printf("ps.paren_indents:");
+	for (int i = 0; i < ps.paren_level; i++)
+	debug_printf(" %d", ps.paren_indents[i]);
+	debug_println("");
+}
 debug_ps_int(cast_mask);
 debug_ps_int(not_cast_mask);
 



CVS commit: src/usr.bin/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 21:08:04 UTC 2021

Modified Files:
src/usr.bin/indent: lexi.c

Log Message:
indent: add debug output for remaining members of parser_status


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/usr.bin/indent/lexi.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/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 19:42:48 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c

Log Message:
indent: rename process_keyword_do to process_do, same for 'else'

Before the symbols from the tokenizer had the prefix 'lsym', the symbols
could not be simply called 'else' and 'do'. The functions for processing
the tokens followed that naming scheme.

When the prefix 'lsym' was introduced, the word 'keyword' was no longer
needed, neither in the constants nor in the function names.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/usr.bin/indent/indent.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/indent

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 19:42:48 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c

Log Message:
indent: rename process_keyword_do to process_do, same for 'else'

Before the symbols from the tokenizer had the prefix 'lsym', the symbols
could not be simply called 'else' and 'do'. The functions for processing
the tokens followed that naming scheme.

When the prefix 'lsym' was introduced, the word 'keyword' was no longer
needed, neither in the constants nor in the function names.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/usr.bin/indent/indent.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/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.208 src/usr.bin/indent/indent.c:1.209
--- src/usr.bin/indent/indent.c:1.208	Fri Nov  5 19:33:28 2021
+++ src/usr.bin/indent/indent.c	Fri Nov  5 19:42:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.208 2021/11/05 19:33:28 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.209 2021/11/05 19:42:48 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)indent.c	5.1
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.208 2021/11/05 19:33:28 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.209 2021/11/05 19:42:48 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -1084,7 +1084,7 @@ process_rbrace(bool *spaced_expr, int *d
 }
 
 static void
-process_keyword_do(bool *force_nl, bool *last_else)
+process_do(bool *force_nl, bool *last_else)
 {
 ps.in_stmt = false;
 
@@ -1101,7 +1101,7 @@ process_keyword_do(bool *force_nl, bool 
 }
 
 static void
-process_keyword_else(bool *force_nl, bool *last_else)
+process_else(bool *force_nl, bool *last_else)
 {
 ps.in_stmt = false;
 
@@ -1491,11 +1491,11 @@ main_loop(void)
 	goto copy_token;
 
 	case lsym_do:
-	process_keyword_do(&force_nl, &last_else);
+	process_do(&force_nl, &last_else);
 	goto copy_token;
 
 	case lsym_else:
-	process_keyword_else(&force_nl, &last_else);
+	process_else(&force_nl, &last_else);
 	goto copy_token;
 
 	case lsym_typedef:



CVS commit: src

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 19:33:29 UTC 2021

Modified Files:
src/tests/usr.bin/indent: token_comment.c
src/usr.bin/indent: indent.c indent.h lexi.c pr_comment.c

Log Message:
indent: rename ps.curr_newline to next_col_1

For symmetry with ps.curr_col_1.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/usr.bin/indent/token_comment.c
cvs rdiff -u -r1.207 -r1.208 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.76 -r1.77 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.129 -r1.130 src/usr.bin/indent/lexi.c
cvs rdiff -u -r1.96 -r1.97 src/usr.bin/indent/pr_comment.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/indent/token_comment.c
diff -u src/tests/usr.bin/indent/token_comment.c:1.17 src/tests/usr.bin/indent/token_comment.c:1.18
--- src/tests/usr.bin/indent/token_comment.c:1.17	Thu Nov  4 18:38:37 2021
+++ src/tests/usr.bin/indent/token_comment.c	Fri Nov  5 19:33:28 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: token_comment.c,v 1.17 2021/11/04 18:38:37 rillig Exp $ */
+/* $NetBSD: token_comment.c,v 1.18 2021/11/05 19:33:28 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -41,7 +41,7 @@
  * - with varying opt.comment_column (-c0, -c1, -c33, -c80)
  * - with varying opt.decl_comment_column (-cd0, -cd1, -cd20, -cd33, -cd80)
  * - with/without ps.decl_on_line
- * - with/without ps.curr_newline
+ * - with/without ps.next_col_1
  *
  * - very long comments that overflow the buffer 'com'
  * - comments that come from save_com

Index: src/usr.bin/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.207 src/usr.bin/indent/indent.c:1.208
--- src/usr.bin/indent/indent.c:1.207	Thu Nov  4 20:31:04 2021
+++ src/usr.bin/indent/indent.c	Fri Nov  5 19:33:28 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.207 2021/11/04 20:31:04 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.208 2021/11/05 19:33:28 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)indent.c	5.1
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.207 2021/11/04 20:31:04 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.208 2021/11/05 19:33:28 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -513,7 +513,7 @@ main_init_globals(void)
 
 ps.s_sym[0] = psym_stmt_list;
 ps.prev_token = lsym_semicolon;
-ps.curr_newline = true;
+ps.next_col_1 = true;
 
 const char *suffix = getenv("SIMPLE_BACKUP_SUFFIX");
 if (suffix != NULL)

Index: src/usr.bin/indent/indent.h
diff -u src/usr.bin/indent/indent.h:1.76 src/usr.bin/indent/indent.h:1.77
--- src/usr.bin/indent/indent.h:1.76	Wed Nov  3 21:47:35 2021
+++ src/usr.bin/indent/indent.h	Fri Nov  5 19:33:28 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.h,v 1.76 2021/11/03 21:47:35 rillig Exp $	*/
+/*	$NetBSD: indent.h,v 1.77 2021/11/05 19:33:28 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -263,9 +263,9 @@ extern struct parser_state {
 lexer_symbol prev_token;
 bool prev_is_type;
 bool curr_is_type;
-bool curr_newline;
 bool curr_col_1;		/* whether the current token started in column
  * 1 of the unformatted input */
+bool next_col_1;
 bool next_unary;		/* whether the following operator should be
  * unary */
 

Index: src/usr.bin/indent/lexi.c
diff -u src/usr.bin/indent/lexi.c:1.129 src/usr.bin/indent/lexi.c:1.130
--- src/usr.bin/indent/lexi.c:1.129	Mon Nov  1 23:44:08 2021
+++ src/usr.bin/indent/lexi.c	Fri Nov  5 19:33:28 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lexi.c,v 1.129 2021/11/01 23:44:08 rillig Exp $	*/
+/*	$NetBSD: lexi.c,v 1.130 2021/11/05 19:33:28 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)lexi.c	8.1 (
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: lexi.c,v 1.129 2021/11/01 23:44:08 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.130 2021/11/05 19:33:28 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/lexi.c 337862 2018-08-15 18:19:45Z pstef $");
 #endif
@@ -294,7 +294,7 @@ debug_lexi(lexer_symbol lsym)
 
 debug_println("ps.prev_token = %s", lsym_name(ps.prev_token));
 debug_ps_bool(prev_is_type);
-debug_ps_bool(curr_newline);
+debug_ps_bool(next_col_1);
 debug_ps_bool(curr_col_1);
 debug_ps_bool(next_unary);
 // procname
@@ -546,8 +546,8 @@ lexer_symbol
 lexi(void)
 {
 token.e = token.s;
-ps.curr_col_1 = ps.curr_newline;
-ps.curr_newline = false;
+ps.curr_col_1 = ps.next_col_1;
+ps.next_col_1 = false;
 ps.prev_is_type = ps.curr_is_type;
 ps.curr_is_type = false;
 
@@ -573,7 +573,7 @@ lexi(void)
 switch (*token.s) {
 case '\n':
 	unary_delim = ps.next_unary;
-	ps.curr_newline = true;
+	ps.next_col_1 = true;
 	/

CVS commit: src

2021-11-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Nov  5 19:33:29 UTC 2021

Modified Files:
src/tests/usr.bin/indent: token_comment.c
src/usr.bin/indent: indent.c indent.h lexi.c pr_comment.c

Log Message:
indent: rename ps.curr_newline to next_col_1

For symmetry with ps.curr_col_1.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/usr.bin/indent/token_comment.c
cvs rdiff -u -r1.207 -r1.208 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.76 -r1.77 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.129 -r1.130 src/usr.bin/indent/lexi.c
cvs rdiff -u -r1.96 -r1.97 src/usr.bin/indent/pr_comment.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/aarch64/include

2021-11-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Nov  5 15:18:18 UTC 2021

Modified Files:
src/sys/arch/aarch64/include: signal.h

Log Message:
Normally, to support COMPAT_NETBSD32 we need to define
__HAVE_STRUCT_SIGCONTEXT in order to support the old
"sigcontext" style of handlers for 32-bit binaries.
However, we only support 32-bit EABI binaries on AArch64,
and by happy accident (due to a libc bug introduced in
2006), 32-bit NetBSD EABI binaries never used "sigcontext"
style handlers.  So, we don't need to carry any of this
baggage forward.

This addresses the AArch64 case of PR kern/56487.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/aarch64/include/signal.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/aarch64/include/signal.h
diff -u src/sys/arch/aarch64/include/signal.h:1.3 src/sys/arch/aarch64/include/signal.h:1.4
--- src/sys/arch/aarch64/include/signal.h:1.3	Wed Oct 27 04:45:42 2021
+++ src/sys/arch/aarch64/include/signal.h	Fri Nov  5 15:18:18 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: signal.h,v 1.3 2021/10/27 04:45:42 thorpej Exp $ */
+/* $NetBSD: signal.h,v 1.4 2021/11/05 15:18:18 thorpej Exp $ */
 
 #ifndef _AARCH64_SIGNAL_H_
 #define	_AARCH64_SIGNAL_H_
@@ -6,8 +6,16 @@
 #include 
 
 #ifdef _KERNEL
-/* This is needed to support COMPAT_NETBSD32. */ 
-#define	__HAVE_STRUCT_SIGCONTEXT
+/*
+ * Normally, to support COMPAT_NETBSD32 we need to define
+ * __HAVE_STRUCT_SIGCONTEXT in order to support the old
+ * "sigcontext" style of handlers for 32-bit binaries.
+ * However, we only support 32-bit EABI binaries on AArch64,
+ * and by happy accident (due to a libc bug introduced in
+ * 2006), 32-bit NetBSD EABI binaries never used "sigcontext"
+ * style handlers.  So, we don't need to carry any of this
+ * baggage forward.
+ */
 #endif /* _KERNEL */
 
 #endif /* ! _AARCH64_SIGNAL_H_ */



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

2021-11-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Nov  5 15:18:18 UTC 2021

Modified Files:
src/sys/arch/aarch64/include: signal.h

Log Message:
Normally, to support COMPAT_NETBSD32 we need to define
__HAVE_STRUCT_SIGCONTEXT in order to support the old
"sigcontext" style of handlers for 32-bit binaries.
However, we only support 32-bit EABI binaries on AArch64,
and by happy accident (due to a libc bug introduced in
2006), 32-bit NetBSD EABI binaries never used "sigcontext"
style handlers.  So, we don't need to carry any of this
baggage forward.

This addresses the AArch64 case of PR kern/56487.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/aarch64/include/signal.h

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



Re: CVS commit: src

2021-11-05 Thread Alistair Crooks
I think you're misreading the diff - it will only wrap if the minimum size
is 0x, which is...ummm...highly unlikely (it's defined to be 0
right now, the type is unsigned)

On Thu, 4 Nov 2021 at 15:56, Joerg Sonnenberger  wrote:

> On Mon, Nov 01, 2021 at 03:09:59AM +, Alistair G. Crooks wrote:
> > Module Name:  src
> > Committed By: agc
> > Date: Mon Nov  1 03:09:59 UTC 2021
> >
> > Modified Files:
> >   src/external/apache2/argon2/dist/phc-winner-argon2/src: argon2.c
> core.c
> >   src/lib/libcrypt: Makefile
> >
> > Log Message:
> > Remove the
> >
> >   COPTS.*+=   -Wno-error=.*
> >
> > lines for building argon2 sources, by fixing the problems at source.
> >
> > Addresses Rin Okuyama's concerns on tech-userlevel/tech-crypto in
> >
> >   Message-ID: 
>
> The +1 part seems questionable to me as it can actually introduce a wrap
> around, can't it?
>
> Joerg
>
>


CVS commit: src/sys/arch/evbarm/gumstix

2021-11-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Nov  5 07:39:23 UTC 2021

Modified Files:
src/sys/arch/evbarm/gumstix: gxpcic.c

Log Message:
Apply patch from PR port-evbarm/52209

Gumstix: KDASSERT in pxa2x0_gpio if no PCMCIA  bushead given but present


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/gumstix/gxpcic.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/evbarm/gumstix/gxpcic.c
diff -u src/sys/arch/evbarm/gumstix/gxpcic.c:1.13 src/sys/arch/evbarm/gumstix/gxpcic.c:1.14
--- src/sys/arch/evbarm/gumstix/gxpcic.c:1.13	Sat Feb  2 20:06:48 2013
+++ src/sys/arch/evbarm/gumstix/gxpcic.c	Fri Nov  5 07:39:22 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: gxpcic.c,v 1.13 2013/02/02 20:06:48 christos Exp $ */
+/*	$NetBSD: gxpcic.c,v 1.14 2021/11/05 07:39:22 skrll Exp $ */
 /*
  * Copyright (C) 2005, 2006 WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -158,20 +158,22 @@ gxpcic_attach(device_t parent, device_t 
 {
 	struct pxapcic_softc *sc = device_private(self);
 	struct pxaip_attach_args *pxa = aux;
-	int nslot, i;
+	int nslot, i, j;
 
 	sc->sc_dev = self;
 	sc->sc_iot = pxa->pxa_iot;
 
 	nslot = gxpcic_count_slot(sc);
 
-	for (i = 0; i < nslot; i++) {
-		if (!gxpcic_slot_irqs[i].valid) 
+	for (i = 0, j = 0; i < nslot; i++) {
+		if (!gxpcic_slot_irqs[i].valid) {
+			j++;
 			continue;
-		sc->sc_irqpin[i] = gxpcic_slot_irqs[i].prdy;
-		sc->sc_irqcfpin[i] = gxpcic_slot_irqs[i].cd;
+		}
+		sc->sc_irqpin[i - j] = gxpcic_slot_irqs[i].prdy;
+		sc->sc_irqcfpin[i - j] = gxpcic_slot_irqs[i].cd;
 	}
-	sc->sc_nslots = nslot;
+	sc->sc_nslots = i - j;
 
 	pxapcic_attach_common(sc, &gxpcic_socket_setup);
 }
@@ -205,13 +207,12 @@ gxpcic_read(struct pxapcic_socket *so, i
 
 	switch (which) {
 	case PXAPCIC_CARD_STATUS:
-		reg = pxa2x0_gpio_get_function(gxpcic_slot_irqs[so->socket].cd);
+		reg = pxa2x0_gpio_get_function(so->sc->sc_irqcfpin[so->socket]);
 		return (HAVE_CARD(reg) ?
 		PXAPCIC_CARD_VALID : PXAPCIC_CARD_INVALID);
 
 	case PXAPCIC_CARD_READY:
-		reg = pxa2x0_gpio_get_function(
-		gxpcic_slot_irqs[so->socket].prdy);
+		reg = pxa2x0_gpio_get_function(so->sc->sc_irqpin[so->socket]);
 		return (reg & GPIO_SET ? 1 : 0);
 
 	default:



CVS commit: src/sys/arch/evbarm/gumstix

2021-11-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Nov  5 07:39:23 UTC 2021

Modified Files:
src/sys/arch/evbarm/gumstix: gxpcic.c

Log Message:
Apply patch from PR port-evbarm/52209

Gumstix: KDASSERT in pxa2x0_gpio if no PCMCIA  bushead given but present


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/gumstix/gxpcic.c

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