CVS commit: src/usr.bin/xlint

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 09:30:07 UTC 2023

Modified Files:
src/usr.bin/xlint/common: emit.c
src/usr.bin/xlint/lint2: emit2.c read.c

Log Message:
lint: clean up messages for internal errors


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/xlint/common/emit.c
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/xlint/lint2/emit2.c
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/xlint/lint2/read.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/xlint/common/emit.c
diff -u src/usr.bin/xlint/common/emit.c:1.17 src/usr.bin/xlint/common/emit.c:1.18
--- src/usr.bin/xlint/common/emit.c:1.17	Fri May 20 21:18:54 2022
+++ src/usr.bin/xlint/common/emit.c	Sat Jan 14 09:30:07 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: emit.c,v 1.17 2022/05/20 21:18:54 rillig Exp $	*/
+/*	$NetBSD: emit.c,v 1.18 2023/01/14 09:30:07 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: emit.c,v 1.17 2022/05/20 21:18:54 rillig Exp $");
+__RCSID("$NetBSD: emit.c,v 1.18 2023/01/14 09:30:07 rillig Exp $");
 #endif
 
 #include 
@@ -112,7 +112,7 @@ outclr(void)
 		outchar('\n');
 		sz = ob.o_next - ob.o_buf;
 		if (sz > ob.o_len)
-			errx(1, "internal error: outclr() 1");
+			errx(1, "internal error: outclr");
 		if (fwrite(ob.o_buf, sz, 1, lout) != 1)
 			err(1, "cannot write to %s", loname);
 		ob.o_next = ob.o_buf;

Index: src/usr.bin/xlint/lint2/emit2.c
diff -u src/usr.bin/xlint/lint2/emit2.c:1.28 src/usr.bin/xlint/lint2/emit2.c:1.29
--- src/usr.bin/xlint/lint2/emit2.c:1.28	Fri May 20 21:18:55 2022
+++ src/usr.bin/xlint/lint2/emit2.c	Sat Jan 14 09:30:07 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: emit2.c,v 1.28 2022/05/20 21:18:55 rillig Exp $ */
+/* $NetBSD: emit2.c,v 1.29 2023/01/14 09:30:07 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -34,7 +34,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: emit2.c,v 1.28 2022/05/20 21:18:55 rillig Exp $");
+__RCSID("$NetBSD: emit2.c,v 1.29 2023/01/14 09:30:07 rillig Exp $");
 #endif
 
 #include "lint2.h"
@@ -94,7 +94,7 @@ outtype(type_t *tp)
 outchar('.');
 outint(tp->t_uniqpos.p_uniq);
 			} else
-errx(1, "internal error: outtype() 2");
+errx(1, "internal error: outtype");
 		} else if (ts == FUNC && tp->t_args != NULL) {
 			na = 0;
 			for (ap = tp->t_args; *ap != NULL; ap++)
@@ -189,7 +189,7 @@ dumpname(hte_t *hte)
 			def = sym;
 	}
 	if (def == NULL)
-		errx(1, "internal error: dumpname() %s", hte->h_name);
+		errx(1, "internal error: dumpname %s", hte->h_name);
 
 	outdef(hte, def);
 }

Index: src/usr.bin/xlint/lint2/read.c
diff -u src/usr.bin/xlint/lint2/read.c:1.77 src/usr.bin/xlint/lint2/read.c:1.78
--- src/usr.bin/xlint/lint2/read.c:1.77	Fri Jan 13 19:50:00 2023
+++ src/usr.bin/xlint/lint2/read.c	Sat Jan 14 09:30:07 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: read.c,v 1.77 2023/01/13 19:50:00 rillig Exp $ */
+/* $NetBSD: read.c,v 1.78 2023/01/14 09:30:07 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: read.c,v 1.77 2023/01/13 19:50:00 rillig Exp $");
+__RCSID("$NetBSD: read.c,v 1.78 2023/01/14 09:30:07 rillig Exp $");
 #endif
 
 #include 
@@ -305,7 +305,7 @@ setfnid(int fid, const char *cp)
 	 * file by lint1 are always the previous index + 1.
 	 */
 	if ((size_t)fid >= ninpfns)
-		errx(1, "internal error: setfnid()");
+		errx(1, "internal error: setfnid");
 	inpfns[fid] = (unsigned short)getfnidx(cp);
 }
 



CVS commit: src/usr.bin/xlint

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 09:30:07 UTC 2023

Modified Files:
src/usr.bin/xlint/common: emit.c
src/usr.bin/xlint/lint2: emit2.c read.c

Log Message:
lint: clean up messages for internal errors


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/xlint/common/emit.c
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/xlint/lint2/emit2.c
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/xlint/lint2/read.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/xlint/lint1

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 10:33:34 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: cgram.y decl.c lint1.h tree.c

Log Message:
lint: use fewer abbreviations

No binary change except for line numbers in assertions in decl.c.


To generate a diff of this commit:
cvs rdiff -u -r1.424 -r1.425 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.302 -r1.303 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.159 -r1.160 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.491 -r1.492 src/usr.bin/xlint/lint1/tree.c

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



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

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 10:33:34 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: cgram.y decl.c lint1.h tree.c

Log Message:
lint: use fewer abbreviations

No binary change except for line numbers in assertions in decl.c.


To generate a diff of this commit:
cvs rdiff -u -r1.424 -r1.425 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.302 -r1.303 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.159 -r1.160 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.491 -r1.492 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.424 src/usr.bin/xlint/lint1/cgram.y:1.425
--- src/usr.bin/xlint/lint1/cgram.y:1.424	Sat Oct  1 09:42:40 2022
+++ src/usr.bin/xlint/lint1/cgram.y	Sat Jan 14 10:33:34 2023
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.424 2022/10/01 09:42:40 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.425 2023/01/14 10:33:34 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.424 2022/10/01 09:42:40 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.425 2023/01/14 10:33:34 rillig Exp $");
 #endif
 
 #include 
@@ -893,7 +893,9 @@ struct_or_union_specifier:	/* C99 6.7.2.
 struct_or_union:		/* C99 6.7.2.1 */
 	  T_STRUCT_OR_UNION {
 		symtyp = FTAG;
-		begin_declaration_level($1 == STRUCT ? DK_MOS : DK_MOU);
+		begin_declaration_level($1 == STRUCT
+		? DK_STRUCT_MEMBER
+		: DK_UNION_MEMBER);
 		dcs->d_offset_in_bits = 0;
 		dcs->d_sou_align_in_bits = CHAR_SIZE;
 		$$ = $1;
@@ -1043,7 +1045,7 @@ enum_specifier:			/* C99 6.7.2.2 */
 enum:/* helper for C99 6.7.2.2 */
 	  T_ENUM {
 		symtyp = FTAG;
-		begin_declaration_level(DK_ENUM_CONST);
+		begin_declaration_level(DK_ENUM_CONSTANT);
 	  }
 	;
 

Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.302 src/usr.bin/xlint/lint1/decl.c:1.303
--- src/usr.bin/xlint/lint1/decl.c:1.302	Sat Oct  1 10:04:06 2022
+++ src/usr.bin/xlint/lint1/decl.c	Sat Jan 14 10:33:34 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.302 2022/10/01 10:04:06 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.303 2023/01/14 10:33:34 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: decl.c,v 1.302 2022/10/01 10:04:06 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.303 2023/01/14 10:33:34 rillig Exp $");
 #endif
 
 #include 
@@ -598,9 +598,9 @@ end_declaration_level(void)
 	dcs = di->d_enclosing;
 
 	switch (di->d_kind) {
-	case DK_MOS:
-	case DK_MOU:
-	case DK_ENUM_CONST:
+	case DK_STRUCT_MEMBER:
+	case DK_UNION_MEMBER:
+	case DK_ENUM_CONSTANT:
 		/*
 		 * Symbols declared in (nested) structs or enums are
 		 * part of the next level (they are removed from the
@@ -1095,7 +1095,7 @@ declare_bit_field(sym_t *dsym, tspec_t *
 		error(37);
 		tp->t_flen = size_in_bits(t);
 	}
-	if (dsym->s_scl == MOU) {
+	if (dsym->s_scl == UNION_MEMBER) {
 		/* bit-field in union is very unusual */
 		warning(41);
 		dsym->s_type->t_bitfield = false;
@@ -1151,7 +1151,7 @@ declarator_1_struct_union(sym_t *dsym)
 		}
 	}
 
-	if (dcs->d_kind == DK_MOU) {
+	if (dcs->d_kind == DK_UNION_MEMBER) {
 		o = dcs->d_offset_in_bits;
 		dcs->d_offset_in_bits = 0;
 	}
@@ -1167,7 +1167,7 @@ declarator_1_struct_union(sym_t *dsym)
 		dsym->u.s_member.sm_offset_in_bits = dcs->d_offset_in_bits;
 		dcs->d_offset_in_bits += sz;
 	}
-	if (dcs->d_kind == DK_MOU && o > dcs->d_offset_in_bits)
+	if (dcs->d_kind == DK_UNION_MEMBER && o > dcs->d_offset_in_bits)
 		dcs->d_offset_in_bits = o;
 
 	check_function_definition(dsym, false);
@@ -1215,7 +1215,7 @@ set_bit_field_width(sym_t *dsym, int len
 		dsym = block_zero_alloc(sizeof(*dsym));
 		dsym->s_name = unnamed;
 		dsym->s_kind = FMEMBER;
-		dsym->s_scl = MOS;
+		dsym->s_scl = STRUCT_MEMBER;
 		dsym->s_type = gettyp(UINT);
 		dsym->s_block_level = -1;
 	}
@@ -1555,13 +1555,15 @@ declarator_name(sym_t *sym)
 	}
 
 	switch (dcs->d_kind) {
-	case DK_MOS:
-	case DK_MOU:
+	case DK_STRUCT_MEMBER:
+	case DK_UNION_MEMBER:
 		/* Set parent */
 		sym->u.s_member.sm_sou_type = dcs->d_tagtyp->t_str;
 		sym->s_def = DEF;
 		/* XXX: Where is sym->u.s_member.sm_offset_in_bits set? */
-		sc = dcs->d_kind == DK_MOS ? MOS : MOU;
+		sc = dcs->d_kind == DK_STRUCT_MEMBER
+		? STRUCT_MEMBER
+		: UNION_MEMBER;
 		break;
 	case DK_EXTERN:
 		/*

Index: src/usr.bin/xlint/lint1/lint1.h
diff -u src/usr.bin/xlint/lint1/lint1.h:1.159 src/usr.bin/xlint/lint1/lint1.h:1.160
--- src/usr.bin/xlint/lint1/lint1.h:1.159	Fri Jan 13 19:41:50 2023
+++ src/usr.bin/xlint/lint1/lint1.h	Sat Jan 14 10:33:34 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.159 2023/01/13 19:41:50 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.160 2023/01/14 10:33:34 

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

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 10:17:31 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: split struct_or_union_member into two halves

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.490 -r1.491 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.490 src/usr.bin/xlint/lint1/tree.c:1.491
--- src/usr.bin/xlint/lint1/tree.c:1.490	Fri Jan 13 19:41:50 2023
+++ src/usr.bin/xlint/lint1/tree.c	Sat Jan 14 10:17:31 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.490 2023/01/13 19:41:50 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.491 2023/01/14 10:17:31 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.490 2023/01/13 19:41:50 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.491 2023/01/14 10:17:31 rillig Exp $");
 #endif
 
 #include 
@@ -556,6 +556,50 @@ build_string(strg_t *strg)
 }
 
 /*
+ * Return whether all struct/union members with the same name have the same
+ * type and offset.
+ */
+static bool
+all_members_compatible(const sym_t *msym)
+{
+	for (const sym_t *csym = msym;
+	 csym != NULL; csym = csym->s_symtab_next) {
+		if (csym->s_scl != MOS && csym->s_scl != MOU)
+			continue;
+		if (strcmp(msym->s_name, csym->s_name) != 0)
+			continue;
+
+		for (const sym_t *sym = csym->s_symtab_next;
+		 sym != NULL; sym = sym->s_symtab_next) {
+
+			if (sym->s_scl != MOS && sym->s_scl != MOU)
+continue;
+			if (strcmp(csym->s_name, sym->s_name) != 0)
+continue;
+			if (csym->u.s_member.sm_offset_in_bits !=
+			sym->u.s_member.sm_offset_in_bits)
+return false;
+
+			bool w = false;
+			if (!types_compatible(csym->s_type, sym->s_type,
+			false, false, ) && !w)
+return false;
+			if (csym->s_bitfield != sym->s_bitfield)
+return false;
+			if (csym->s_bitfield) {
+type_t *tp1 = csym->s_type;
+type_t *tp2 = sym->s_type;
+if (tp1->t_flen != tp2->t_flen)
+	return false;
+if (tp1->t_foffs != tp2->t_foffs)
+	return false;
+			}
+		}
+	}
+	return true;
+}
+
+/*
  * Returns a symbol which has the same name as the msym argument and is a
  * member of the struct or union specified by the tn argument.
  */
@@ -564,8 +608,6 @@ struct_or_union_member(tnode_t *tn, op_t
 {
 	struct_or_union	*str;
 	type_t	*tp;
-	sym_t	*sym, *csym;
-	bool	eq;
 	tspec_t	t;
 
 	/*
@@ -607,7 +649,8 @@ struct_or_union_member(tnode_t *tn, op_t
 	 * If this struct/union has a member with the name of msym, return it.
 	 */
 	if (str != NULL) {
-		for (sym = msym; sym != NULL; sym = sym->s_symtab_next) {
+		for (sym_t *sym = msym;
+		 sym != NULL; sym = sym->s_symtab_next) {
 			if (!is_member(sym))
 continue;
 			if (sym->u.s_member.sm_sou_type != str)
@@ -618,56 +661,7 @@ struct_or_union_member(tnode_t *tn, op_t
 		}
 	}
 
-	/*
-	 * Set eq to false if there are struct/union members with the same
-	 * name and different types and/or offsets.
-	 */
-	eq = true;
-	for (csym = msym; csym != NULL; csym = csym->s_symtab_next) {
-		if (csym->s_scl != MOS && csym->s_scl != MOU)
-			continue;
-		if (strcmp(msym->s_name, csym->s_name) != 0)
-			continue;
-		for (sym = csym->s_symtab_next; sym != NULL;
-		sym = sym->s_symtab_next) {
-			bool w;
-
-			if (sym->s_scl != MOS && sym->s_scl != MOU)
-continue;
-			if (strcmp(csym->s_name, sym->s_name) != 0)
-continue;
-			if (csym->u.s_member.sm_offset_in_bits !=
-			sym->u.s_member.sm_offset_in_bits) {
-eq = false;
-break;
-			}
-			w = false;
-			eq = types_compatible(csym->s_type, sym->s_type,
-			false, false, ) && !w;
-			if (!eq)
-break;
-			if (csym->s_bitfield != sym->s_bitfield) {
-eq = false;
-break;
-			}
-			if (csym->s_bitfield) {
-type_t	*tp1, *tp2;
-
-tp1 = csym->s_type;
-tp2 = sym->s_type;
-if (tp1->t_flen != tp2->t_flen) {
-	eq = false;
-	break;
-}
-if (tp1->t_foffs != tp2->t_foffs) {
-	eq = false;
-	break;
-}
-			}
-		}
-		if (!eq)
-			break;
-	}
+	bool eq = all_members_compatible(msym);
 
 	/*
 	 * Now handle the case in which the left operand refers really



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

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 10:17:31 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: split struct_or_union_member into two halves

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.490 -r1.491 src/usr.bin/xlint/lint1/tree.c

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



CVS commit: src/sys/dev/pci

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:17:20 UTC 2023

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

Log Message:
- avoid panic when failing during attach or detach with modload/drvctl.
- free workqueue resources when detaching.
- remove debug message.


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

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:17:20 UTC 2023

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

Log Message:
- avoid panic when failing during attach or detach with modload/drvctl.
- free workqueue resources when detaching.
- remove debug message.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/if_aq.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_aq.c
diff -u src/sys/dev/pci/if_aq.c:1.40 src/sys/dev/pci/if_aq.c:1.41
--- src/sys/dev/pci/if_aq.c:1.40	Sat Jan 14 13:16:27 2023
+++ src/sys/dev/pci/if_aq.c	Sat Jan 14 13:17:20 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_aq.c,v 1.40 2023/01/14 13:16:27 ryo Exp $	*/
+/*	$NetBSD: if_aq.c,v 1.41 2023/01/14 13:17:20 ryo Exp $	*/
 
 /**
  * aQuantia Corporation Network Driver
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.40 2023/01/14 13:16:27 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.41 2023/01/14 13:17:20 ryo Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_if_aq.h"
@@ -931,7 +931,8 @@ struct aq_firmware_ops {
 #define AQ_EVCNT_ATTACH_MISC(sc, name, desc)\
 	AQ_EVCNT_ATTACH(sc, name, desc, EVCNT_TYPE_MISC)
 #define AQ_EVCNT_DETACH(sc, name)	\
-	evcnt_detach(&(sc)->sc_evcount_##name##_ev)
+	if ((sc)->sc_evcount_##name##_name[0] != '\0')			\
+		evcnt_detach(&(sc)->sc_evcount_##name##_ev)
 #define AQ_EVCNT_ADD(sc, name, val)	\
 	((sc)->sc_evcount_##name##_ev.ev_count += (val))
 #endif /* AQ_EVENT_COUNTERS */
@@ -1587,6 +1588,9 @@ aq_detach(device_t self, int flags __unu
 	struct ifnet * const ifp = >sc_ethercom.ec_if;
 	int i;
 
+	if (sc->sc_dev == NULL)
+		return 0;
+
 	if (sc->sc_iosize != 0) {
 		if (ifp->if_softc != NULL) {
 			IFNET_LOCK(ifp);
@@ -1601,12 +1605,19 @@ aq_detach(device_t self, int flags __unu
 			}
 		}
 		if (sc->sc_nintrs > 0) {
+			callout_stop(>sc_tick_ch);
+
 			pci_intr_release(sc->sc_pc, sc->sc_intrs,
 			sc->sc_nintrs);
 			sc->sc_intrs = NULL;
 			sc->sc_nintrs = 0;
 		}
 
+		if (sc->sc_reset_wq != NULL) {
+			workqueue_destroy(sc->sc_reset_wq);
+			sc->sc_reset_wq = NULL;
+		}
+
 		aq_txrx_rings_free(sc);
 
 		if (ifp->if_softc != NULL) {
@@ -1614,7 +1625,6 @@ aq_detach(device_t self, int flags __unu
 			if_detach(ifp);
 		}
 
-		aprint_debug_dev(sc->sc_dev, "%s: bus_space_unmap\n", __func__);
 		bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_iosize);
 		sc->sc_iosize = 0;
 	}
@@ -1647,10 +1657,14 @@ aq_detach(device_t self, int flags __unu
 	AQ_EVCNT_DETACH(sc, cprc);
 #endif
 
-	ifmedia_fini(>sc_media);
+	if (sc->sc_ethercom.ec_ifmedia != NULL) {
+		ifmedia_fini(>sc_media);
+		sc->sc_ethercom.ec_ifmedia = NULL;
+	}
 
 	mutex_destroy(>sc_mpi_mutex);
 	mutex_destroy(>sc_mutex);
+	sc->sc_dev = NULL;
 
 	return 0;
 }



CVS commit: src/sys/dev/pci

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:17:50 UTC 2023

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

Log Message:
fix indentation


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

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:17:50 UTC 2023

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

Log Message:
fix indentation


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/if_aq.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_aq.c
diff -u src/sys/dev/pci/if_aq.c:1.41 src/sys/dev/pci/if_aq.c:1.42
--- src/sys/dev/pci/if_aq.c:1.41	Sat Jan 14 13:17:20 2023
+++ src/sys/dev/pci/if_aq.c	Sat Jan 14 13:17:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_aq.c,v 1.41 2023/01/14 13:17:20 ryo Exp $	*/
+/*	$NetBSD: if_aq.c,v 1.42 2023/01/14 13:17:50 ryo Exp $	*/
 
 /**
  * aQuantia Corporation Network Driver
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.41 2023/01/14 13:17:20 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.42 2023/01/14 13:17:50 ryo Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_if_aq.h"
@@ -5003,10 +5003,10 @@ aq_ioctl(struct ifnet *ifp, unsigned lon
 	case SIOCDELMULTI:
 		AQ_LOCK(sc);
 		if ((sc->sc_if_flags & IFF_RUNNING) != 0) {
-		   /*
-			* Multicast list has changed; set the hardware filter
-			* accordingly.
-			*/
+			/*
+			 * Multicast list has changed; set the hardware filter
+			 * accordingly.
+			 */
 			error = aq_set_filter(sc);
 		}
 		AQ_UNLOCK(sc);



CVS commit: src/sys/dev/pci

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:19:32 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.1455 -r1.1456 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1454 -r1.1455 src/sys/dev/pci/pcidevs_data.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/pci

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:19:32 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.1455 -r1.1456 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1454 -r1.1455 src/sys/dev/pci/pcidevs_data.h

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

diffs are larger than 1MB and have been omitted


CVS commit: src/sys/dev/pci

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:18:17 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add Aquantia (Marvell) AQC113 ethernet devices and the variants


To generate a diff of this commit:
cvs rdiff -u -r1.1474 -r1.1475 src/sys/dev/pci/pcidevs

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

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:18:17 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add Aquantia (Marvell) AQC113 ethernet devices and the variants


To generate a diff of this commit:
cvs rdiff -u -r1.1474 -r1.1475 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1474 src/sys/dev/pci/pcidevs:1.1475
--- src/sys/dev/pci/pcidevs:1.1474	Wed Jan  4 03:12:09 2023
+++ src/sys/dev/pci/pcidevs	Sat Jan 14 13:18:17 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1474 2023/01/04 03:12:09 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1475 2023/01/14 13:18:17 ryo Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1404,17 +1404,25 @@ product APPLE BCM5701		0x1645	BCM5701
 
 /* Aquantia Corp. */
 product AQUANTIA AQC100		0x00b1	AQC100 10 Gigabit Network Adapter
+product AQUANTIA AQC113DEV	0x00c0	AQC113DEV 10 Gigabit Network Adapter
+product AQUANTIA AQC113		0x04c0	AQC113 10 Gigabit Network Adapter
 product AQUANTIA AQC107		0x07b1	AQC107 10 Gigabit Network Adapter
 product AQUANTIA AQC108		0x08b1	AQC108 5 Gigabit Network Adapter
 product AQUANTIA AQC109		0x09b1	AQC109 2.5 Gigabit Network Adapter
 product AQUANTIA AQC111		0x11b1	AQC111 5 Gigabit Network Adapter
+product AQUANTIA AQC116C	0x11c0	AQC116C Gigabit Network Adapter
 product AQUANTIA AQC112		0x12b1	AQC112 2.5 Gigabit Network Adapter
+product AQUANTIA AQC115C	0x12c0	AQC115C 2.5 Gigabit Network Adapter
+product AQUANTIA AQC113C	0x14c0	AQC113C 10 Gigabit Network Adapter
+product AQUANTIA AQC113CA	0x34c0	AQC113CA 10 Gigabit Network Adapter
 product AQUANTIA AQC100S	0x80b1	AQC100S 10 Gigabit Network Adapter
 product AQUANTIA AQC107S	0x87b1	AQC107S 10 Gigabit Network Adapter
 product AQUANTIA AQC108S	0x88b1	AQC108S 5 Gigabit Network Adapter
 product AQUANTIA AQC109S	0x89b1	AQC109S 2.5 Gigabit Network Adapter
 product AQUANTIA AQC111S	0x91b1	AQC111S 5 Gigabit Network Adapter
 product AQUANTIA AQC112S	0x92b1	AQC112S 2.5 Gigabit Network Adapter
+product AQUANTIA AQC114CS	0x93c0	AQC114CS 5 Gigabit Network Adapter
+product AQUANTIA AQC113CS	0x94c0	AQC113CS 10 Gigabit Network Adapter
 product AQUANTIA D100		0xd100	D100 10 Gigabit Network Adapter
 product AQUANTIA D107		0xd107	D107 10 Gigabit Network Adapter
 product AQUANTIA D108		0xd108	D108 5 Gigabit Network Adapter



CVS commit: src/sys/dev/pci

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:20:15 UTC 2023

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

Log Message:
Added support for the Aquantia (Marvell) AQC113 10G Network Adapter and the 
variants, to aq(4)


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/pci/if_aq.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_aq.c
diff -u src/sys/dev/pci/if_aq.c:1.42 src/sys/dev/pci/if_aq.c:1.43
--- src/sys/dev/pci/if_aq.c:1.42	Sat Jan 14 13:17:50 2023
+++ src/sys/dev/pci/if_aq.c	Sat Jan 14 13:20:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_aq.c,v 1.42 2023/01/14 13:17:50 ryo Exp $	*/
+/*	$NetBSD: if_aq.c,v 1.43 2023/01/14 13:20:15 ryo Exp $	*/
 
 /**
  * aQuantia Corporation Network Driver
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.42 2023/01/14 13:17:50 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.43 2023/01/14 13:20:15 ryo Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_if_aq.h"
@@ -116,19 +116,29 @@ __KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.
 #define AQ_RSS_HASHKEY_SIZE		40
 #define AQ_RSS_INDIRECTION_TABLE_MAX	64
 
-#define AQ_JUMBO_MTU_REV_A		9000
-#define AQ_JUMBO_MTU_REV_B		16338
+#define AQ1_JUMBO_MTU_REV_A		9000
+#define AQ1_JUMBO_MTU_REV_B		16338
+#define AQ2_JUMBO_MTU			16338
 
 /*
  * TERMINOLOGY
+ *	ATL  (AQ1) = Atlantic.  AQC100,107-109,111,112.
+ *	ATL2 (AQ2) = Atlantic2. AQC113-116.
  *	MPI = MAC PHY INTERFACE?
  *	RPO = RX Protocol Offloading
  *	TPO = TX Protocol Offloading
  *	RPF = RX Packet Filter
  *	TPB = TX Packet buffer
  *	RPB = RX Packet buffer
+ *	ART = Action Resolver Table
+ *	TC  = Traffic Class
  */
 
+enum aq_hwtype {
+	HWTYPE_AQ1,
+	HWTYPE_AQ2
+};
+
 /* registers */
 #define AQ_FW_SOFTRESET_REG			0x
 #define  AQ_FW_SOFTRESET_RESET			__BIT(15) /* soft reset bit */
@@ -136,6 +146,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.
 
 #define AQ_FW_VERSION_REG			0x0018
 #define AQ_HW_REVISION_REG			0x001c
+#define AQ2_HW_FPGA_VERSION_REG			0x00f4	/* AQ2 */
 #define AQ_GLB_NVR_INTERFACE1_REG		0x0100
 
 #define AQ_FW_MBOX_CMD_REG			0x0200
@@ -182,7 +193,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.
 #define  RBL_STATUS_HOST_BOOT			0xf1a7
 
 #define AQ_FW_GLB_CPU_SEM_REG(i)		(0x03a0 + (i) * 4)
-#define AQ_FW_SEM_RAM_REG			AQ_FW_GLB_CPU_SEM_REG(2)
+#define AQ1_FW_SEM_RAM_REG			AQ_FW_GLB_CPU_SEM_REG(2)
+#define AQ2_ART_SEM_REGAQ_FW_GLB_CPU_SEM_REG(3)
 
 #define AQ_FW_GLB_CTL2_REG			0x0404
 #define  AQ_FW_GLB_CTL2_MCP_UP_FORCE_INTERRUPT	__BIT(1)
@@ -194,7 +206,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.
 
 #define AQ_PCI_REG_CONTROL_6_REG		0x1014
 
-// msix bitmap */
+/* msix bitmap */
 #define AQ_INTR_STATUS_REG			0x2000	/* intr status */
 #define AQ_INTR_STATUS_CLR_REG			0x2050	/* intr status clear */
 #define AQ_INTR_MASK_REG			0x2060	/* intr mask set */
@@ -212,7 +224,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.
 
 /* AQ_GEN_INTR_MAP_REG[AQ_RINGS_NUM] 0x2180-0x2200 */
 #define AQ_GEN_INTR_MAP_REG(i)			(0x2180 + (i) * 4)
-#define  AQ_B0_ERR_INT8U
+#define  AQ_B0_ERR_INT8
 
 #define AQ_INTR_CTRL_REG			0x2300
 #define  AQ_INTR_CTRL_IRQMODE			__BITS(1,0)
@@ -231,8 +243,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.
 #define  FW_MPI_RESETCTRL_RESET_DIS		__BIT(29)
 
 #define RX_SYSCONTROL_REG			0x5000
-#define  RX_SYSCONTROL_RPB_DMA_LOOPBACK		__BIT(6)
-#define  RX_SYSCONTROL_RPF_TPO_LOOPBACK		__BIT(8)
+#define  RX_SYSCONTROL_RPF_TPO_SYS_LOOPBACK	__BIT(8)
+#define  RX_SYSCONTROL_RPB_DMA_SYS_LOOPBACK	__BIT(6)
+#define  RX_SYSCONTROL_RPB_DMA_NET_LOOPBACK	__BIT(4)
 #define  RX_SYSCONTROL_RESET_DIS		__BIT(29)
 
 #define RX_TCP_RSS_HASH_REG			0x5040
@@ -252,14 +265,19 @@ __KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.
 #define  RPF_L2BC_ACTION			__BITS(12,14)
 #define  RPF_L2BC_THRESHOLD			__BITS(31,16)
 
-/* RPF_L2UC_*_REG[34] (actual [38]?) */
+/* RPF_L2UC_*_REG[34] (AQ2 has [38]) */
 #define RPF_L2UC_LSW_REG(i)			(0x5110 + (i) * 8)
 #define RPF_L2UC_MSW_REG(i)			(0x5114 + (i) * 8)
 #define  RPF_L2UC_MSW_MACADDR_HI		__BITS(15,0)
 #define  RPF_L2UC_MSW_ACTION			__BITS(18,16)
+#define  RPF_L2UC_MSW_TAG			__BITS(27,22)	/* AQ2 */
 #define  RPF_L2UC_MSW_EN			__BIT(31)
-#define AQ_HW_MAC_OWN			0	/* index of own address */
-#define AQ_HW_MAC_NUM			34
+
+#define AQ_HW_MAC_OWN0 /* index of own address */
+#define AQ1_HW_MAC_NUM34
+#define AQ2_HW_MAC_NUM38
+#define AQ_HW_MAC_NUM(sc)			\
+	(HWTYPE_AQ2_P((sc)) ? AQ2_HW_MAC_NUM : AQ1_HW_MAC_NUM)
 
 /* RPF_MCAST_FILTER_REG[8] 0x5250-0x5270 */
 #define RPF_MCAST_FILTER_REG(i)			(0x5250 + (i) * 4)
@@ -283,6 +301,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.
 #define  RPF_VLAN_FILTER_RXQ_EN			__BIT(28)
 #define  RPF_VLAN_FILTER_RXQ			__BITS(24,20)
 #define  RPF_VLAN_FILTER_ACTION			__BITS(18,16)
+#define  RPF_VLAN_FILTER_TAG			__BITS(15,12)	/* AQ2 */
 #define  RPF_VLAN_FILTER_ID			__BITS(11,0)
 
 /* RPF_ETHERTYPE_FILTER_REG[AQ_RINGS_NUM] 

CVS commit: src/share/man/man4

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:20:40 UTC 2023

Modified Files:
src/share/man/man4: aq.4

Log Message:
- add AQC113 and the variants
- fix first appeared version to 9.1. it was backported.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/aq.4

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



CVS commit: src/share/man/man4

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:20:40 UTC 2023

Modified Files:
src/share/man/man4: aq.4

Log Message:
- add AQC113 and the variants
- fix first appeared version to 9.1. it was backported.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/aq.4

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/man4/aq.4
diff -u src/share/man/man4/aq.4:1.4 src/share/man/man4/aq.4:1.5
--- src/share/man/man4/aq.4:1.4	Fri Apr 24 04:37:27 2020
+++ src/share/man/man4/aq.4	Sat Jan 14 13:20:40 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: aq.4,v 1.4 2020/04/24 04:37:27 ryo Exp $
+.\"	$NetBSD: aq.4,v 1.5 2023/01/14 13:20:40 ryo Exp $
 .\"
 .\" Copyright (c) 2020 Ryo Shimizu 
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 24, 2020
+.Dd January 14, 2023
 .Dt AQ 4
 .Os
 .Sh NAME
@@ -64,6 +64,22 @@ AQC111S 5 Gigabit Network Adapter
 .It
 AQC112S 2.5 Gigabit Network Adapter
 .It
+AQC113DEV 10 Gigabit Network Adapter
+.It
+AQC113 10 Gigabit Network Adapter
+.It
+AQC113C 10 Gigabit Network Adapter
+.It
+AQC113CA 10 Gigabit Network Adapter
+.It
+AQC113CS 10 Gigabit Network Adapter
+.It
+AQC114CS 5 Gigabit Network Adapter
+.It
+AQC115C 2.5 Gigabit Network Adapter
+.It
+AQC116C Gigabit Network Adapter
+.It
 D100 10 Gigabit Network Adapter
 .It
 D107 10 Gigabit Network Adapter
@@ -83,7 +99,7 @@ D109 2.5 Gigabit Network Adapter
 The
 .Nm
 driver first appeared in
-.Nx 10.0 ,
+.Nx 9.1 ,
 and is based on the
 .Fx
 driver of the same name, but has been drastically rewritten by Ryo Shimizu.



CVS commit: src/doc

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:20:54 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
add support for AQC113-116 to aq(4)


To generate a diff of this commit:
cvs rdiff -u -r1.2947 -r1.2948 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2947 src/doc/CHANGES:1.2948
--- src/doc/CHANGES:1.2947	Thu Jan 12 12:05:15 2023
+++ src/doc/CHANGES	Sat Jan 14 13:20:54 2023
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2947 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2948 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -45,3 +45,4 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 		Baytrail [msaitoh 20230107]
 	piixpm(4): Add support new AMD chipsets that do not have indirect
 		access I/O ports. [msaitoh 20230110]
+	aq(4): add support for AQC113-116 [ryo 20230114]



CVS commit: src/doc

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:20:54 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
add support for AQC113-116 to aq(4)


To generate a diff of this commit:
cvs rdiff -u -r1.2947 -r1.2948 src/doc/CHANGES

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

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:20:15 UTC 2023

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

Log Message:
Added support for the Aquantia (Marvell) AQC113 10G Network Adapter and the 
variants, to aq(4)


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

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:16:27 UTC 2023

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

Log Message:
fix build error in sys/module/if_aq/

avoid error of "comparison of integer expressions of different signedness" and 
-Werror=sign-compare


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/if_aq.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_aq.c
diff -u src/sys/dev/pci/if_aq.c:1.39 src/sys/dev/pci/if_aq.c:1.40
--- src/sys/dev/pci/if_aq.c:1.39	Wed Nov  2 20:38:22 2022
+++ src/sys/dev/pci/if_aq.c	Sat Jan 14 13:16:27 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_aq.c,v 1.39 2022/11/02 20:38:22 andvar Exp $	*/
+/*	$NetBSD: if_aq.c,v 1.40 2023/01/14 13:16:27 ryo Exp $	*/
 
 /**
  * aQuantia Corporation Network Driver
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.39 2022/11/02 20:38:22 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.40 2023/01/14 13:16:27 ryo Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_if_aq.h"
@@ -1008,7 +1008,7 @@ struct aq_softc {
 #define FEATURES_REV_B0		0x2000
 #define FEATURES_REV_B1		0x4000
 #define FEATURES_REV_B		(FEATURES_REV_B0|FEATURES_REV_B1)
-	uint32_t sc_max_mtu;
+	int sc_max_mtu;
 	uint32_t sc_mbox_addr;
 
 	bool sc_rbl_enabled;
@@ -3874,7 +3874,7 @@ aq_watchdog_check(struct aq_softc * cons
 	AQ_LOCKED(sc);
 
 	bool ok = true;
-	for (u_int n = 0; n < sc->sc_nqueues; n++) {
+	for (int n = 0; n < sc->sc_nqueues; n++) {
 		struct aq_txring *txring = >sc_queue[n].txring;
 
 		mutex_enter(>txr_mutex);
@@ -4810,7 +4810,7 @@ aq_unset_stopping_flags(struct aq_softc 
 	AQ_LOCKED(sc);
 
 	/* Must unset stopping flags in ascending order. */
-	for (unsigned i = 0; i < sc->sc_nqueues; i++) {
+	for (int i = 0; i < sc->sc_nqueues; i++) {
 		struct aq_txring *txr = >sc_queue[i].txring;
 		struct aq_rxring *rxr = >sc_queue[i].rxring;
 
@@ -4833,7 +4833,7 @@ aq_set_stopping_flags(struct aq_softc *s
 	AQ_LOCKED(sc);
 
 	/* Must unset stopping flags in ascending order. */
-	for (unsigned i = 0; i < sc->sc_nqueues; i++) {
+	for (int i = 0; i < sc->sc_nqueues; i++) {
 		struct aq_txring *txr = >sc_queue[i].txring;
 		struct aq_rxring *rxr = >sc_queue[i].rxring;
 
@@ -4920,7 +4920,7 @@ aq_handle_reset_work(struct work *work, 
 	__func__, AQ_READ_REG(sc, AQ_INTR_MASK_REG),
 	AQ_READ_REG(sc, AQ_INTR_STATUS_REG));
 
-	for (u_int n = 0; n < sc->sc_nqueues; n++) {
+	for (int n = 0; n < sc->sc_nqueues; n++) {
 		struct aq_txring *txring = >sc_queue[n].txring;
 		u_int head = AQ_READ_REG_BIT(sc,
 		TX_DMA_DESC_HEAD_PTR_REG(txring->txr_index),



CVS commit: src/sys/dev/pci

2023-01-14 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Sat Jan 14 13:16:27 UTC 2023

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

Log Message:
fix build error in sys/module/if_aq/

avoid error of "comparison of integer expressions of different signedness" and 
-Werror=sign-compare


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/if_aq.c

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



CVS commit: src

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 08:48:18 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint2: msg_001.ln
src/usr.bin/xlint/lint2: chk.c externs2.h main2.c

Log Message:
lint: rename lint2 functions to be more expressive


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint2/msg_001.ln
cvs rdiff -u -r1.52 -r1.53 src/usr.bin/xlint/lint2/chk.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/xlint/lint2/externs2.h
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/xlint/lint2/main2.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/lint2/msg_001.ln
diff -u src/tests/usr.bin/xlint/lint2/msg_001.ln:1.5 src/tests/usr.bin/xlint/lint2/msg_001.ln:1.6
--- src/tests/usr.bin/xlint/lint2/msg_001.ln:1.5	Sat Oct  1 10:04:06 2022
+++ src/tests/usr.bin/xlint/lint2/msg_001.ln	Sat Jan 14 08:48:18 2023
@@ -1,4 +1,4 @@
-# $NetBSD: msg_001.ln,v 1.5 2022/10/01 10:04:06 rillig Exp $
+# $NetBSD: msg_001.ln,v 1.6 2023/01/14 08:48:18 rillig Exp $
 #
 # Test data for message 1 of lint2:
 #	%s defined( %s ), but never used
@@ -17,7 +17,7 @@ S msg_001.c
 12 d 0.12 e 4main F I
 
 # If a function is declared once in old-style and once with prototype,
-# the prototype definition is preferred; see chkname.
+# the prototype definition is preferred; see check_name.
 #
 # extern merge_old_style_and_prototype();
 20 d 0.20 e 29merge_old_style_and_prototype F I

Index: src/usr.bin/xlint/lint2/chk.c
diff -u src/usr.bin/xlint/lint2/chk.c:1.52 src/usr.bin/xlint/lint2/chk.c:1.53
--- src/usr.bin/xlint/lint2/chk.c:1.52	Sat Oct  1 09:42:40 2022
+++ src/usr.bin/xlint/lint2/chk.c	Sat Jan 14 08:48:18 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: chk.c,v 1.52 2022/10/01 09:42:40 rillig Exp $ */
+/* $NetBSD: chk.c,v 1.53 2023/01/14 08:48:18 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: chk.c,v 1.52 2022/10/01 09:42:40 rillig Exp $");
+__RCSID("$NetBSD: chk.c,v 1.53 2023/01/14 08:48:18 rillig Exp $");
 #endif
 
 #include 
@@ -48,23 +48,23 @@ __RCSID("$NetBSD: chk.c,v 1.52 2022/10/0
 
 #include "lint2.h"
 
-static	void	chkund(const hte_t *);
-static	void	chkdnu(const hte_t *);
-static	void	chkdnud(const hte_t *);
-static	void	chkmd(const hte_t *);
+static	void	check_used_not_defined(const hte_t *);
+static	void	check_defined_not_used(const hte_t *);
+static	void	check_declared_not_used_or_defined(const hte_t *);
+static	void	check_multiple_definitions(const hte_t *);
 static	void	chkvtui(const hte_t *, sym_t *, sym_t *);
 static	void	chkvtdi(const hte_t *, sym_t *, sym_t *);
 static	void	chkfaui(const hte_t *, sym_t *, sym_t *);
 static	void	chkau(const hte_t *, int, sym_t *, sym_t *, pos_t *,
 			   fcall_t *, fcall_t *, type_t *, type_t *);
-static	void	chkrvu(const hte_t *, sym_t *);
-static	void	chkadecl(const hte_t *, sym_t *, sym_t *);
+static	void	check_return_values(const hte_t *, sym_t *);
+static	void	check_argument_declarations(const hte_t *, sym_t *, sym_t *);
 static	void	printflike(const hte_t *, fcall_t *, int, const char *, type_t **);
 static	void	scanflike(const hte_t *, fcall_t *, int, const char *, type_t **);
-static	void	badfmt(const hte_t *, fcall_t *);
-static	void	inconarg(const hte_t *, fcall_t *, int);
-static	void	tofewarg(const hte_t *, fcall_t *);
-static	void	tomanyarg(const hte_t *, fcall_t *);
+static	void	bad_format_string(const hte_t *, fcall_t *);
+static	void	inconsistent_arguments(const hte_t *, fcall_t *, int);
+static	void	too_few_arguments(const hte_t *, fcall_t *);
+static	void	too_many_arguments(const hte_t *, fcall_t *);
 static	bool	types_compatible(type_t *, type_t *, bool, bool, bool, bool *);
 static	bool	prototypes_compatible(type_t *, type_t *, bool *);
 static	bool	matches_no_arg_function(type_t *, bool *);
@@ -74,7 +74,7 @@ static	bool	matches_no_arg_function(type
  * If there is a symbol named "main", mark it as used.
  */
 void
-mainused(void)
+mark_main_as_used(void)
 {
 	hte_t	*hte;
 
@@ -86,17 +86,17 @@ mainused(void)
  * Performs all tests for a single name
  */
 void
-chkname(const hte_t *hte)
+check_name(const hte_t *hte)
 {
 	sym_t	*sym, *def, *pdecl, *decl;
 
 	if (uflag) {
-		chkund(hte);
-		chkdnu(hte);
+		check_used_not_defined(hte);
+		check_defined_not_used(hte);
 		if (xflag)
-			chkdnud(hte);
+			check_declared_not_used_or_defined(hte);
 	}
-	chkmd(hte);
+	check_multiple_definitions(hte);
 
 	/* Get definition, prototype declaration and declaration */
 	def = pdecl = decl = NULL;
@@ -122,16 +122,16 @@ chkname(const hte_t *hte)
 
 	chkfaui(hte, def, decl);
 
-	chkrvu(hte, def);
+	check_return_values(hte, def);
 
-	chkadecl(hte, def, decl);
+	check_argument_declarations(hte, def, decl);
 }
 
 /*
  * Print a warning if the name has been used, but not defined.
  */
 static void
-chkund(const hte_t *hte)

CVS commit: src

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 08:48:18 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint2: msg_001.ln
src/usr.bin/xlint/lint2: chk.c externs2.h main2.c

Log Message:
lint: rename lint2 functions to be more expressive


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint2/msg_001.ln
cvs rdiff -u -r1.52 -r1.53 src/usr.bin/xlint/lint2/chk.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/xlint/lint2/externs2.h
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/xlint/lint2/main2.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/xlint

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 09:21:58 UTC 2023

Modified Files:
src/usr.bin/xlint/common: param.h
src/usr.bin/xlint/xlint: xlint.c

Log Message:
lint: remove unnecessary MBLKSIZ, use stack buffer in xlint

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/xlint/common/param.h
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/xlint/xlint/xlint.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/xlint/common/param.h
diff -u src/usr.bin/xlint/common/param.h:1.9 src/usr.bin/xlint/common/param.h:1.10
--- src/usr.bin/xlint/common/param.h:1.9	Tue Aug  3 17:27:48 2021
+++ src/usr.bin/xlint/common/param.h	Sat Jan 14 09:21:58 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.9 2021/08/03 17:27:48 rillig Exp $	*/
+/*	$NetBSD: param.h,v 1.10 2023/01/14 09:21:58 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -32,12 +32,6 @@
  */
 
 /*
- * The size of memory blocks which are used to allocate memory in larger
- * chunks.
- */
-#define	MBLKSIZ		((size_t)0x4000)
-
-/*
  * Sizes of hash tables
  * Should be primes. Possible primes are
  * 307, 401, 503, 601, 701, 809, 907, 1009, 1103, 1201, 1301, 1409, 1511.

Index: src/usr.bin/xlint/xlint/xlint.c
diff -u src/usr.bin/xlint/xlint/xlint.c:1.95 src/usr.bin/xlint/xlint/xlint.c:1.96
--- src/usr.bin/xlint/xlint/xlint.c:1.95	Sat Oct  1 09:48:02 2022
+++ src/usr.bin/xlint/xlint/xlint.c	Sat Jan 14 09:21:58 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: xlint.c,v 1.95 2022/10/01 09:48:02 rillig Exp $ */
+/* $NetBSD: xlint.c,v 1.96 2023/01/14 09:21:58 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: xlint.c,v 1.95 2022/10/01 09:48:02 rillig Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.96 2023/01/14 09:21:58 rillig Exp $");
 #endif
 
 #include 
@@ -915,36 +915,31 @@ static void
 cat(char *const *srcs, const char *dest)
 {
 	int	ifd, ofd, i;
-	char	*src, *buf;
+	char	*src;
 	ssize_t	rlen;
+	char	buf[0x4000];
 
 	if ((ofd = open(dest, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
 		warn("cannot open %s", dest);
 		terminate(-1);
 	}
 
-	buf = xmalloc(MBLKSIZ);
-
 	for (i = 0; (src = srcs[i]) != NULL; i++) {
 		if ((ifd = open(src, O_RDONLY)) == -1) {
-			free(buf);
 			warn("cannot open %s", src);
 			terminate(-1);
 		}
 		do {
-			if ((rlen = read(ifd, buf, MBLKSIZ)) == -1) {
-free(buf);
+			if ((rlen = read(ifd, buf, sizeof(buf))) == -1) {
 warn("read error on %s", src);
 terminate(-1);
 			}
 			if (write(ofd, buf, (size_t)rlen) == -1) {
-free(buf);
 warn("write error on %s", dest);
 terminate(-1);
 			}
-		} while (rlen == MBLKSIZ);
+		} while (rlen == sizeof(buf));
 		(void)close(ifd);
 	}
 	(void)close(ofd);
-	free(buf);
 }



CVS commit: src/usr.bin/xlint

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 09:21:58 UTC 2023

Modified Files:
src/usr.bin/xlint/common: param.h
src/usr.bin/xlint/xlint: xlint.c

Log Message:
lint: remove unnecessary MBLKSIZ, use stack buffer in xlint

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/xlint/common/param.h
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/xlint/xlint/xlint.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/xlint/xlint

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 10:38:36 UTC 2023

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

Log Message:
lint: explicitly ignore errors when printing status messages

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/usr.bin/xlint/xlint/xlint.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/xlint/xlint/xlint.c
diff -u src/usr.bin/xlint/xlint/xlint.c:1.96 src/usr.bin/xlint/xlint/xlint.c:1.97
--- src/usr.bin/xlint/xlint/xlint.c:1.96	Sat Jan 14 09:21:58 2023
+++ src/usr.bin/xlint/xlint/xlint.c	Sat Jan 14 10:38:36 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: xlint.c,v 1.96 2023/01/14 09:21:58 rillig Exp $ */
+/* $NetBSD: xlint.c,v 1.97 2023/01/14 10:38:36 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: xlint.c,v 1.96 2023/01/14 09:21:58 rillig Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.97 2023/01/14 10:38:36 rillig Exp $");
 #endif
 
 #include 
@@ -269,7 +269,7 @@ terminate(int signo)
 		(void)close(cpp.outfd);
 	if (cpp.outfile != NULL) {
 		if (signo != 0 && getenv("LINT_KEEP_CPPOUT_ON_ERROR") != NULL)
-			printf("lint: preprocessor output kept in %s\n",
+			(void)printf("lint: preprocessor output kept in %s\n",
 			cpp.outfile);
 		else
 			(void)remove(cpp.outfile);
@@ -318,12 +318,12 @@ usage(const char *fmt, ...)
 	va_list ap;
 
 	name = getprogname();
-	fprintf(stderr, "%s: ", name);
+	(void)fprintf(stderr, "%s: ", name);
 	va_start(ap, fmt);
-	vfprintf(stderr, fmt, ap);
+	(void)vfprintf(stderr, fmt, ap);
 	va_end(ap);
 	if (fmt[0] != '\0')
-		fprintf(stderr, "\n");
+		(void)fprintf(stderr, "\n");
 
 	indent = (int)(strlen("usage: ") + strlen(name));
 	(void)fprintf(stderr,



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

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 10:38:36 UTC 2023

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

Log Message:
lint: explicitly ignore errors when printing status messages

No binary change.


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

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 11:15:08 UTC 2023

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

Log Message:
tests/lint: add more tests for array/enum mismatch


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_348.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

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 14 11:15:08 UTC 2023

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

Log Message:
tests/lint: add more tests for array/enum mismatch


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_348.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_348.c
diff -u src/tests/usr.bin/xlint/lint1/msg_348.c:1.7 src/tests/usr.bin/xlint/lint1/msg_348.c:1.8
--- src/tests/usr.bin/xlint/lint1/msg_348.c:1.7	Sun Jan  8 15:22:33 2023
+++ src/tests/usr.bin/xlint/lint1/msg_348.c	Sat Jan 14 11:15:07 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_348.c,v 1.7 2023/01/08 15:22:33 rillig Exp $	*/
+/*	$NetBSD: msg_348.c,v 1.8 2023/01/14 11:15:07 rillig Exp $	*/
 # 3 "msg_348.c"
 
 // Test for message 348: maximum value %d of '%s' does not match maximum array index %d [348]
@@ -8,6 +8,9 @@
 enum color {
 	red,
 	green,
+	/* expect+5: previous declaration of 'blue' [260] */
+	/* expect+4: previous declaration of 'blue' [260] */
+	/* expect+3: previous declaration of 'blue' [260] */
 	/* expect+2: previous declaration of 'blue' [260] */
 	/* expect+1: previous declaration of 'blue' [260] */
 	blue
@@ -100,6 +103,51 @@ color_name_computed_pointer(enum color c
 	return ()[color];
 }
 
+/*
+ * If the accessed array has character type, it may contain a trailing null
+ * character.
+ */
+void
+color_initial_letter(enum color color)
+{
+	static const char len_2_null[] = "RG";
+	static const char len_3_null[] = "RGB";
+	static const char len_4_null[] = "RGB_";
+
+	static const char len_2_of_3[3] = "RG";
+	static const char len_3_of_3[3] = "RGB";
+	static const char len_4_of_4[4] = "RGB_";
+
+	/* TODO: array is too short */
+	if (len_2_null[color] != '\0')
+		return;
+
+	/* FIXME: lint should not warn since the maximum usable array index is 2 */
+	/* expect+1: warning: maximum value 2 of 'enum color' does not match maximum array index 3 [348] */
+	if (len_3_null[color] != '\0')
+		return;
+
+	/* FIXME: lint should not warn since the maximum usable array index is 3, not 4 */
+	/* expect+1: warning: maximum value 2 of 'enum color' does not match maximum array index 4 [348] */
+	if (len_4_null[color] != '\0')
+		return;
+
+	/*
+	 * The array has 3 elements, as expected.  If lint were to inspect
+	 * the content of the array, it could see that [2] is a null
+	 * character.  That null character may be intended though.
+	 */
+	if (len_2_of_3[color] != '\0')
+		return;
+
+	if (len_3_of_3[color] != '\0')
+		return;
+
+	/* expect+1: warning: maximum value 2 of 'enum color' does not match maximum array index 3 [348] */
+	if (len_4_of_4[color])
+		return;
+}
+
 extern const char *incomplete_color_name[];
 
 const char *



CVS commit: src/sbin/fsck_ffs

2023-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 12:12:50 UTC 2023

Modified Files:
src/sbin/fsck_ffs: fsck.h inode.c pass4.c utilities.c

Log Message:
catch up with sign changes in the fs.h


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sbin/fsck_ffs/fsck.h
cvs rdiff -u -r1.73 -r1.74 src/sbin/fsck_ffs/inode.c
cvs rdiff -u -r1.29 -r1.30 src/sbin/fsck_ffs/pass4.c
cvs rdiff -u -r1.67 -r1.68 src/sbin/fsck_ffs/utilities.c

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



CVS commit: src/sbin/fsck_ffs

2023-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 12:12:50 UTC 2023

Modified Files:
src/sbin/fsck_ffs: fsck.h inode.c pass4.c utilities.c

Log Message:
catch up with sign changes in the fs.h


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sbin/fsck_ffs/fsck.h
cvs rdiff -u -r1.73 -r1.74 src/sbin/fsck_ffs/inode.c
cvs rdiff -u -r1.29 -r1.30 src/sbin/fsck_ffs/pass4.c
cvs rdiff -u -r1.67 -r1.68 src/sbin/fsck_ffs/utilities.c

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

Modified files:

Index: src/sbin/fsck_ffs/fsck.h
diff -u src/sbin/fsck_ffs/fsck.h:1.56 src/sbin/fsck_ffs/fsck.h:1.57
--- src/sbin/fsck_ffs/fsck.h:1.56	Thu Nov 17 01:40:38 2022
+++ src/sbin/fsck_ffs/fsck.h	Sat Jan 14 07:12:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsck.h,v 1.56 2022/11/17 06:40:38 chs Exp $	*/
+/*	$NetBSD: fsck.h,v 1.57 2023/01/14 12:12:50 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -97,7 +97,7 @@ struct inostat {
  * which are described by the following structure.
  */
 extern struct inostatlist {
-	longil_numalloced;  /* number of inodes allocated in this cg */
+	size_t  il_numalloced;  /* number of inodes allocated in this cg */
 	struct inostat *il_stat;/* inostat info for this cylinder group */
 } *inostathead;
 

Index: src/sbin/fsck_ffs/inode.c
diff -u src/sbin/fsck_ffs/inode.c:1.73 src/sbin/fsck_ffs/inode.c:1.74
--- src/sbin/fsck_ffs/inode.c:1.73	Fri Apr 17 05:42:27 2020
+++ src/sbin/fsck_ffs/inode.c	Sat Jan 14 07:12:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: inode.c,v 1.73 2020/04/17 09:42:27 jdolecek Exp $	*/
+/*	$NetBSD: inode.c,v 1.74 2023/01/14 12:12:50 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)inode.c	8.8 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: inode.c,v 1.73 2020/04/17 09:42:27 jdolecek Exp $");
+__RCSID("$NetBSD: inode.c,v 1.74 2023/01/14 12:12:50 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -731,11 +731,11 @@ allocino(ino_t request, int type)
 		return (0);
 	cg = ino_to_cg(sblock, ino);
 	/* If necessary, extend the inoinfo array. grow exponentially */
-	if ((ino % sblock->fs_ipg) >= (uint64_t)inostathead[cg].il_numalloced) {
-		unsigned long newalloced, i;
+	if ((ino % sblock->fs_ipg) >= inostathead[cg].il_numalloced) {
+		size_t newalloced, i;
 		newalloced = MIN(sblock->fs_ipg,
 			MAX(2 * inostathead[cg].il_numalloced, 10));
-		info = calloc(newalloced, sizeof(struct inostat));
+		info = calloc(newalloced, sizeof(*info));
 		if (info == NULL) {
 			pwarn("cannot alloc %lu bytes to extend inoinfo\n",
 sizeof(struct inostat) * newalloced);

Index: src/sbin/fsck_ffs/pass4.c
diff -u src/sbin/fsck_ffs/pass4.c:1.29 src/sbin/fsck_ffs/pass4.c:1.30
--- src/sbin/fsck_ffs/pass4.c:1.29	Sat Jan  7 14:41:29 2023
+++ src/sbin/fsck_ffs/pass4.c	Sat Jan 14 07:12:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pass4.c,v 1.29 2023/01/07 19:41:29 chs Exp $	*/
+/*	$NetBSD: pass4.c,v 1.30 2023/01/14 12:12:50 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pass4.c	8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: pass4.c,v 1.29 2023/01/07 19:41:29 chs Exp $");
+__RCSID("$NetBSD: pass4.c,v 1.30 2023/01/14 12:12:50 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -62,7 +62,8 @@ pass4(void)
 	struct zlncnt *zlnp;
 	union dinode *dp;
 	struct inodesc idesc;
-	int n, i;
+	int n;
+	size_t i;
 	uint32_t cg;
 	struct inostat *info;
 

Index: src/sbin/fsck_ffs/utilities.c
diff -u src/sbin/fsck_ffs/utilities.c:1.67 src/sbin/fsck_ffs/utilities.c:1.68
--- src/sbin/fsck_ffs/utilities.c:1.67	Thu Nov 17 01:40:38 2022
+++ src/sbin/fsck_ffs/utilities.c	Sat Jan 14 07:12:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: utilities.c,v 1.67 2022/11/17 06:40:38 chs Exp $	*/
+/*	$NetBSD: utilities.c,v 1.68 2023/01/14 12:12:50 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)utilities.c	8.6 (Berkeley) 5/19/95";
 #else
-__RCSID("$NetBSD: utilities.c,v 1.67 2022/11/17 06:40:38 chs Exp $");
+__RCSID("$NetBSD: utilities.c,v 1.68 2023/01/14 12:12:50 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -590,7 +590,7 @@ inoinfo(ino_t inum)
 {
 	static struct inostat unallocated = { USTATE, 0, 0 };
 	struct inostatlist *ilp;
-	int iloff;
+	size_t iloff;
 
 	if (inum > maxino)
 		errexit("inoinfo: inumber %llu out of range",



CVS commit: src/share/mk

2023-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 14:46:24 UTC 2023

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
add aarch64 and sparc to binutils 2.39


To generate a diff of this commit:
cvs rdiff -u -r1.1292 -r1.1293 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1292 src/share/mk/bsd.own.mk:1.1293
--- src/share/mk/bsd.own.mk:1.1292	Fri Jan 13 11:00:33 2023
+++ src/share/mk/bsd.own.mk	Sat Jan 14 09:46:24 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1292 2023/01/13 16:00:33 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1293 2023/01/14 14:46:24 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -100,7 +100,9 @@ MKGCCCMDS?=	no
 #
 .if ${MACHINE_ARCH} == "x86_64" || \
 ${MACHINE_ARCH} == "i386" || \
-${MACHINE_ARCH} == "alpha"
+${MACHINE_ARCH} == "alpha" || \\
+!empty(MACHINE_ARCH:Maarch64*) || \
+!empty(MACHINE_ARCH:Msparc*)
 HAVE_BINUTILS?=	239
 .else
 HAVE_BINUTILS?=	234



CVS commit: src/share/mk

2023-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 14:46:24 UTC 2023

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
add aarch64 and sparc to binutils 2.39


To generate a diff of this commit:
cvs rdiff -u -r1.1292 -r1.1293 src/share/mk/bsd.own.mk

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



CVS commit: src/sbin/fsck_ffs

2023-01-14 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jan 14 17:01:11 UTC 2023

Modified Files:
src/sbin/fsck_ffs: inode.c

Log Message:
Use %zu rather than %lu to print a size_t (should fix i386 build).

But, philosophical question, shouldn't the product of two size_t
variables really be an area_t, or something like that?


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sbin/fsck_ffs/inode.c

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

Modified files:

Index: src/sbin/fsck_ffs/inode.c
diff -u src/sbin/fsck_ffs/inode.c:1.74 src/sbin/fsck_ffs/inode.c:1.75
--- src/sbin/fsck_ffs/inode.c:1.74	Sat Jan 14 12:12:50 2023
+++ src/sbin/fsck_ffs/inode.c	Sat Jan 14 17:01:10 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: inode.c,v 1.74 2023/01/14 12:12:50 christos Exp $	*/
+/*	$NetBSD: inode.c,v 1.75 2023/01/14 17:01:10 kre Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)inode.c	8.8 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: inode.c,v 1.74 2023/01/14 12:12:50 christos Exp $");
+__RCSID("$NetBSD: inode.c,v 1.75 2023/01/14 17:01:10 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -737,7 +737,7 @@ allocino(ino_t request, int type)
 			MAX(2 * inostathead[cg].il_numalloced, 10));
 		info = calloc(newalloced, sizeof(*info));
 		if (info == NULL) {
-			pwarn("cannot alloc %lu bytes to extend inoinfo\n",
+			pwarn("cannot alloc %zu bytes to extend inoinfo\n",
 sizeof(struct inostat) * newalloced);
 			return 0;
 		}



CVS commit: src/sbin/fsck_ffs

2023-01-14 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jan 14 17:01:11 UTC 2023

Modified Files:
src/sbin/fsck_ffs: inode.c

Log Message:
Use %zu rather than %lu to print a size_t (should fix i386 build).

But, philosophical question, shouldn't the product of two size_t
variables really be an area_t, or something like that?


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sbin/fsck_ffs/inode.c

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



CVS commit: src/external/gpl3/binutils

2023-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 17:31:02 UTC 2023

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/sparc: bfd.h bfdver.h
config.h
src/external/gpl3/binutils/lib/libgnuctf/arch/sparc: config.h defs.mk
src/external/gpl3/binutils/lib/libiberty/arch/sparc: defs.mk
src/external/gpl3/binutils/lib/libopcodes/arch/sparc: config.h
src/external/gpl3/binutils/usr.bin/common/arch/sparc: config.h defs.mk
src/external/gpl3/binutils/usr.bin/common/arch/vax: defs.mk
src/external/gpl3/binutils/usr.bin/gas/arch/sparc: config.h defs.mk
src/external/gpl3/binutils/usr.bin/gprof/arch/sparc: gconfig.h
src/external/gpl3/binutils/usr.bin/ld/arch/sparc: config.h

Log Message:
regen sparc


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfdver.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/binutils/lib/libgnuctf/arch/sparc/config.h \
src/external/gpl3/binutils/lib/libgnuctf/arch/sparc/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libiberty/arch/sparc/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libopcodes/arch/sparc/config.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc/config.h
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc/defs.mk
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/binutils/usr.bin/common/arch/vax/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/usr.bin/gas/arch/sparc/config.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/binutils/usr.bin/gas/arch/sparc/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/usr.bin/gprof/arch/sparc/gconfig.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/usr.bin/ld/arch/sparc/config.h

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

Modified files:

Index: src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h
diff -u src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h:1.11 src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h:1.12
--- src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h:1.11	Sat Apr  4 16:45:45 2020
+++ src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h	Sat Jan 14 12:31:01 2023
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp  */
+/* Generated from: NetBSD: mknative-binutils,v 1.14 2022/12/24 20:17:46 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically
@@ -11,7 +11,7 @@
 
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright (C) 1990-2020 Free Software Foundation, Inc.
+   Copyright (C) 1990-2022 Free Software Foundation, Inc.
 
Contributed by Cygnus Support.
 
@@ -45,9 +45,11 @@ extern "C" {
 
 #include "ansidecl.h"
 #include "symcat.h"
-#include "bfd_stdint.h"
+#include 
+#include 
 #include "diagnostics.h"
 #include 
+#include 
 #include 
 
 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
@@ -67,23 +69,6 @@ extern "C" {
comma and then the length of the string.  Doing this by hand
is error prone, so using this macro is safer.  */
 #define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
-/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
-   to create the arguments to another macro, since the preprocessor
-   will mis-count the number of arguments to the outer macro (by not
-   evaluating STRING_COMMA_LEN and so missing the comma).  This is a
-   problem for example when trying to use STRING_COMMA_LEN to build
-   the arguments to the strncmp() macro.  Hence this alternative
-   definition of strncmp is provided here.
-
-   Note - these macros do NOT work if STR2 is not a constant string.  */
-#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
-  /* strcpy() can have a similar problem, but since we know we are
- copying a constant string, we can use memcpy which will be faster
- since there is no need to check for a NUL byte inside STR.  We
- can also save time if we do not need to copy the terminating NUL.  */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
 
 #define BFD_SUPPORTS_PLUGINS 1
 
@@ -95,109 +80,64 @@ extern "C" {
 /* The word size of the default bfd target.  */
 #define BFD_DEFAULT_TARGET_SIZE 32
 
-#define BFD_HOST_64BIT_LONG 0
-#define 

CVS commit: src/external/gpl3/binutils

2023-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 17:31:02 UTC 2023

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/sparc: bfd.h bfdver.h
config.h
src/external/gpl3/binutils/lib/libgnuctf/arch/sparc: config.h defs.mk
src/external/gpl3/binutils/lib/libiberty/arch/sparc: defs.mk
src/external/gpl3/binutils/lib/libopcodes/arch/sparc: config.h
src/external/gpl3/binutils/usr.bin/common/arch/sparc: config.h defs.mk
src/external/gpl3/binutils/usr.bin/common/arch/vax: defs.mk
src/external/gpl3/binutils/usr.bin/gas/arch/sparc: config.h defs.mk
src/external/gpl3/binutils/usr.bin/gprof/arch/sparc: gconfig.h
src/external/gpl3/binutils/usr.bin/ld/arch/sparc: config.h

Log Message:
regen sparc


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfd.h
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/bfdver.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libbfd/arch/sparc/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/binutils/lib/libgnuctf/arch/sparc/config.h \
src/external/gpl3/binutils/lib/libgnuctf/arch/sparc/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libiberty/arch/sparc/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/lib/libopcodes/arch/sparc/config.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc/config.h
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/binutils/usr.bin/common/arch/sparc/defs.mk
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/binutils/usr.bin/common/arch/vax/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/usr.bin/gas/arch/sparc/config.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/binutils/usr.bin/gas/arch/sparc/defs.mk
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils/usr.bin/gprof/arch/sparc/gconfig.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/usr.bin/ld/arch/sparc/config.h

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



CVS commit: src/distrib/sets/lists/tests

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jan 15 00:34:10 UTC 2023

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
distrib/sets: sort list of test files

In ASCII, '_' comes before lowercase letters.


To generate a diff of this commit:
cvs rdiff -u -r1.1239 -r1.1240 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1239 src/distrib/sets/lists/tests/mi:1.1240
--- src/distrib/sets/lists/tests/mi:1.1239	Wed Jan  4 05:25:08 2023
+++ src/distrib/sets/lists/tests/mi	Sun Jan 15 00:34:10 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1239 2023/01/04 05:25:08 rillig Exp $
+# $NetBSD: mi,v 1.1240 2023/01/15 00:34:10 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -175,8 +175,8 @@
 ./usr/libdata/debug/usr/tests/net/if_tap		tests-net-debug		compattestfile,atf
 ./usr/libdata/debug/usr/tests/net/if_vether		tests-net-debug		compattestfile,atf
 ./usr/libdata/debug/usr/tests/net/if_vlan		tests-net-debug		compattestfile,atf
-./usr/libdata/debug/usr/tests/net/inpcb			tests-net-debug		compattestfile,atf
 ./usr/libdata/debug/usr/tests/net/in_cksum		tests-net-debug		compattestfile,atf
+./usr/libdata/debug/usr/tests/net/inpcb			tests-net-debug		compattestfile,atf
 ./usr/libdata/debug/usr/tests/net/ipsec			tests-net-debug		compattestfile,atf
 ./usr/libdata/debug/usr/tests/net/mcast			tests-net-debug		compattestfile,atf
 ./usr/libdata/debug/usr/tests/net/net			tests-net-debug		compattestfile,atf
@@ -4217,6 +4217,11 @@
 ./usr/tests/net/if_wg/t_interoperability		tests-net-tests		atf,rump
 ./usr/tests/net/if_wg/t_misctests-net-tests		atf,rump
 ./usr/tests/net/if_wg/t_tunneltests-net-tests		atf,rump
+./usr/tests/net/in_cksumtests-net-tests		compattestfile,atf
+./usr/tests/net/in_cksum/Atffile			tests-net-tests		compattestfile,atf
+./usr/tests/net/in_cksum/Kyuafile			tests-net-tests		compattestfile,atf,kyua
+./usr/tests/net/in_cksum/in_cksum			tests-net-tests		compattestfile,atf
+./usr/tests/net/in_cksum/t_in_cksum			tests-net-tests		compattestfile,atf
 ./usr/tests/net/inpcb	tests-net-tests		compattestfile,atf
 ./usr/tests/net/inpcb/Atffiletests-net-tests		atf,rump
 ./usr/tests/net/inpcb/Kyuafiletests-net-tests		atf,rump,kyua
@@ -4224,11 +4229,6 @@
 ./usr/tests/net/inpcb/inpcb_bind			tests-net-tests		atf,rump
 ./usr/tests/net/inpcb/t_broadcast_bind			tests-net-tests		atf,rump
 ./usr/tests/net/inpcb/t_inpcb_bind			tests-net-tests		atf,rump
-./usr/tests/net/in_cksumtests-net-tests		compattestfile,atf
-./usr/tests/net/in_cksum/Atffile			tests-net-tests		compattestfile,atf
-./usr/tests/net/in_cksum/Kyuafile			tests-net-tests		compattestfile,atf,kyua
-./usr/tests/net/in_cksum/in_cksum			tests-net-tests		compattestfile,atf
-./usr/tests/net/in_cksum/t_in_cksum			tests-net-tests		compattestfile,atf
 ./usr/tests/net/ipsec	tests-net-tests		compattestfile,atf
 ./usr/tests/net/ipsec/Atffiletests-net-tests		atf,rump
 ./usr/tests/net/ipsec/Kyuafiletests-net-tests		atf,rump,kyua
@@ -4273,10 +4273,10 @@
 ./usr/tests/net/net/Kyuafiletests-net-tests		compattestfile,atf,kyua
 ./usr/tests/net/net/t_bindtests-net-tests		atf
 ./usr/tests/net/net/t_forwarding			tests-net-tests		atf,rump
+./usr/tests/net/net/t_ip_reasstests-net-tests		atf,rump
 ./usr/tests/net/net/t_ipaddresstests-net-tests		atf,rump
 ./usr/tests/net/net/t_ipv6_lifetime			tests-net-tests		atf,rump
 ./usr/tests/net/net/t_ipv6address			tests-net-tests		atf,rump
-./usr/tests/net/net/t_ip_reasstests-net-tests		atf,rump
 ./usr/tests/net/net/t_mappedtests-net-tests		atf
 ./usr/tests/net/net/t_mtudisctests-net-tests		atf,rump
 ./usr/tests/net/net/t_mtudisc6tests-net-tests		atf,rump
@@ -4312,10 +4312,10 @@
 ./usr/tests/net/tcp	tests-net-tests		compattestfile,atf
 ./usr/tests/net/tcp/Atffiletests-net-tests		atf,rump
 ./usr/tests/net/tcp/Kyuafiletests-net-tests		atf,rump,kyua
-./usr/tests/net/tcp/tcp_shutdown			tests-net-tests		atf,rump
 ./usr/tests/net/tcp/t_tcp_connect_port			tests-net-tests		atf,rump
 ./usr/tests/net/tcp/t_tcp_nctests-net-tests		atf,rump
 ./usr/tests/net/tcp/t_tcp_shutdown			tests-net-tests		atf,rump
+./usr/tests/net/tcp/tcp_shutdown			tests-net-tests		atf,rump
 ./usr/tests/net/wireguardtests-obsolete		obsolete
 ./usr/tests/net/wireguard/Atffile			tests-obsolete		obsolete
 ./usr/tests/net/wireguard/Kyuafile			tests-obsolete		obsolete



CVS commit: src/distrib/sets/lists/tests

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jan 15 00:34:10 UTC 2023

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
distrib/sets: sort list of test files

In ASCII, '_' comes before lowercase letters.


To generate a diff of this commit:
cvs rdiff -u -r1.1239 -r1.1240 src/distrib/sets/lists/tests/mi

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



CVS commit: src

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jan 15 00:53:19 UTC 2023

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: Makefile
Added Files:
src/tests/usr.bin/xlint/lint1: expr_sizeof.c

Log Message:
tests/lint: add test for parsing sizeof expressions


To generate a diff of this commit:
cvs rdiff -u -r1.1240 -r1.1241 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.130 -r1.131 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/expr_sizeof.c

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1240 src/distrib/sets/lists/tests/mi:1.1241
--- src/distrib/sets/lists/tests/mi:1.1240	Sun Jan 15 00:34:10 2023
+++ src/distrib/sets/lists/tests/mi	Sun Jan 15 00:53:19 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1240 2023/01/15 00:34:10 rillig Exp $
+# $NetBSD: mi,v 1.1241 2023/01/15 00:53:19 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6553,6 +6553,7 @@
 ./usr/tests/usr.bin/xlint/lint1/expr_promote_trad.exp-ln	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/expr_range.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/expr_range.exp			tests-obsolete		obsolete,atf
+./usr/tests/usr.bin/xlint/lint1/expr_sizeof.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/feat_stacktrace.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/feat_stacktrace.exp		tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/gcc_attribute.c			tests-usr.bin-tests	compattestfile,atf

Index: src/tests/usr.bin/xlint/lint1/Makefile
diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.130 src/tests/usr.bin/xlint/lint1/Makefile:1.131
--- src/tests/usr.bin/xlint/lint1/Makefile:1.130	Wed Jan  4 05:25:08 2023
+++ src/tests/usr.bin/xlint/lint1/Makefile	Sun Jan 15 00:53:19 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.130 2023/01/04 05:25:08 rillig Exp $
+# $NetBSD: Makefile,v 1.131 2023/01/15 00:53:19 rillig Exp $
 
 NOMAN=		# defined
 MAX_MESSAGE=	349		# see lint1/err.c
@@ -111,6 +111,7 @@ FILES+=		expr_promote.exp-ln
 FILES+=		expr_promote_trad.c
 FILES+=		expr_promote_trad.exp-ln
 FILES+=		expr_range.c
+FILES+=		expr_sizeof.c
 FILES+=		feat_stacktrace.c
 FILES+=		gcc_attribute.c
 FILES+=		gcc_attribute_aligned.c

Added files:

Index: src/tests/usr.bin/xlint/lint1/expr_sizeof.c
diff -u /dev/null src/tests/usr.bin/xlint/lint1/expr_sizeof.c:1.1
--- /dev/null	Sun Jan 15 00:53:19 2023
+++ src/tests/usr.bin/xlint/lint1/expr_sizeof.c	Sun Jan 15 00:53:19 2023
@@ -0,0 +1,51 @@
+/*	$NetBSD: expr_sizeof.c,v 1.1 2023/01/15 00:53:19 rillig Exp $	*/
+# 3 "expr_sizeof.c"
+
+/*
+ * C99 6.5.3.4 "The sizeof operator"
+ * C11 6.5.3.4 "The sizeof operator"
+ */
+
+/*
+ * A sizeof expression can either take a type name or an expression.
+ */
+void sink(unsigned long);
+
+struct {
+	int member;
+} s, *ps;
+
+/*
+ * In a sizeof expression taking a type name, the type name must be enclosed
+ * in parentheses.
+ */
+/* expect+1: error: negative array dimension (-4) [20] */
+typedef int sizeof_int[-(int)sizeof(int)];
+
+/*
+ * In a sizeof expression taking an expression, the expression may or may not
+ * be enclosed in parentheses, like any other expression.
+ */
+/* expect+1: error: negative array dimension (-4) [20] */
+typedef int sizeof_paren_zero[-(int)sizeof(0)];
+/* expect+1: error: negative array dimension (-4) [20] */
+typedef int sizeof_zero[-(int)sizeof 0];
+
+/*
+ * Even though 's' is not a constant expression, 'sizeof s' is.
+ */
+/* expect+1: error: negative array dimension (-4) [20] */
+typedef int sizeof_global_var[-(int)sizeof s];
+/* expect+1: error: negative array dimension (-4) [20] */
+typedef int sizeof_paren_global_var[-(int)sizeof(s)];
+
+/*
+ * Even though 'sizeof(s)' may look like a function call expression, the
+ * parentheses around 's' are ordinary parentheses and do not influence the
+ * associativity.  Therefore, the '.' following the '(s)' takes precedence
+ * over the 'sizeof'.  Same for the '->' following the '(ps)'.
+ */
+/* expect+1: error: negative array dimension (-4) [20] */
+typedef int sizeof_paren_global_struct_member[-(int)sizeof(s).member];
+/* expect+1: error: negative array dimension (-4) [20] */
+typedef int sizeof_paren_global_ptr_struct_member[-(int)sizeof(ps)->member];



CVS commit: src

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jan 15 00:53:19 UTC 2023

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: Makefile
Added Files:
src/tests/usr.bin/xlint/lint1: expr_sizeof.c

Log Message:
tests/lint: add test for parsing sizeof expressions


To generate a diff of this commit:
cvs rdiff -u -r1.1240 -r1.1241 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.130 -r1.131 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/expr_sizeof.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/hp300

2023-01-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 15 06:19:46 UTC 2023

Modified Files:
src/sys/arch/hp300/dev: dcm.c dcmreg.h diofbreg.h diofbvar.h dma.c
dnkbd.c dvbox.c frodoreg.h hpib.c mcclock_frodo.c rbox.c rboxreg.h
rtc.c sti_sgc.c topcatreg.h
src/sys/arch/hp300/hp300: autoconf.c machdep.c trap.c
src/sys/arch/hp300/include: bus.h cpu.h
src/sys/arch/hp300/stand/common: clock.c devopen.c hil.c ite_dumb.c
ite_sti.c machdep.c netio.c prf.c rd.c scsi.c scsireg.h sd.c
src/sys/arch/hp300/stand/inst: inst.c

Log Message:
TAB/space cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/hp300/dev/dcm.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/dev/dcmreg.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/diofbreg.h \
src/sys/arch/hp300/dev/diofbvar.h src/sys/arch/hp300/dev/dvbox.c \
src/sys/arch/hp300/dev/rbox.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/hp300/dev/dma.c \
src/sys/arch/hp300/dev/hpib.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/dev/dnkbd.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp300/dev/frodoreg.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/mcclock_frodo.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/rboxreg.h \
src/sys/arch/hp300/dev/topcatreg.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp300/dev/rtc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp300/dev/sti_sgc.c
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/hp300/hp300/autoconf.c
cvs rdiff -u -r1.237 -r1.238 src/sys/arch/hp300/hp300/machdep.c
cvs rdiff -u -r1.155 -r1.156 src/sys/arch/hp300/hp300/trap.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp300/include/bus.h
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/hp300/include/cpu.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/stand/common/clock.c \
src/sys/arch/hp300/stand/common/devopen.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hp300/stand/common/hil.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/stand/common/ite_dumb.c \
src/sys/arch/hp300/stand/common/ite_sti.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hp300/stand/common/machdep.c \
src/sys/arch/hp300/stand/common/rd.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hp300/stand/common/netio.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp300/stand/common/prf.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/stand/common/scsi.c \
src/sys/arch/hp300/stand/common/sd.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp300/stand/common/scsireg.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp300/stand/inst/inst.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/hp300/dev/dcm.c
diff -u src/sys/arch/hp300/dev/dcm.c:1.90 src/sys/arch/hp300/dev/dcm.c:1.91
--- src/sys/arch/hp300/dev/dcm.c:1.90	Sun Apr 10 09:50:45 2022
+++ src/sys/arch/hp300/dev/dcm.c	Sun Jan 15 06:19:45 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: dcm.c,v 1.90 2022/04/10 09:50:45 andvar Exp $	*/
+/*	$NetBSD: dcm.c,v 1.91 2023/01/15 06:19:45 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.90 2022/04/10 09:50:45 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.91 2023/01/15 06:19:45 tsutsui Exp $");
 
 #include "opt_kgdb.h"
 
@@ -302,7 +302,7 @@ CFATTACH_DECL_NEW(dcm, sizeof(struct dcm
 static	struct dcmdevice *dcm_cn = NULL;	/* pointer to hardware */
 static	int dcmconsinit;			/* has been initialized */
 #if 0
-static	int dcm_lastcnpri = CN_DEAD; 	/* XXX last priority */
+static	int dcm_lastcnpri = CN_DEAD;	/* XXX last priority */
 #endif
 
 static struct consdev dcm_cons = {

Index: src/sys/arch/hp300/dev/dcmreg.h
diff -u src/sys/arch/hp300/dev/dcmreg.h:1.10 src/sys/arch/hp300/dev/dcmreg.h:1.11
--- src/sys/arch/hp300/dev/dcmreg.h:1.10	Thu May 22 16:30:40 2014
+++ src/sys/arch/hp300/dev/dcmreg.h	Sun Jan 15 06:19:45 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: dcmreg.h,v 1.10 2014/05/22 16:30:40 dholland Exp $	*/
+/*	$NetBSD: dcmreg.h,v 1.11 2023/01/15 06:19:45 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -196,7 +196,7 @@ struct	dcmpreg {
 #define BR_50		0x01
 #define BR_75		0x02
 #define BR_110		0x03
-#define BR_134  	0x04
+#define BR_134		0x04
 #define BR_150		0x05
 #define BR_300		0x06
 #define BR_600		0x07

Index: src/sys/arch/hp300/dev/diofbreg.h
diff -u src/sys/arch/hp300/dev/diofbreg.h:1.3 src/sys/arch/hp300/dev/diofbreg.h:1.4
--- src/sys/arch/hp300/dev/diofbreg.h:1.3	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/diofbreg.h	Sun Jan 15 06:19:45 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: diofbreg.h,v 1.3 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: diofbreg.h,v 1.4 2023/01/15 06:19:45 tsutsui Exp $	*/
 /*	$OpenBSD: diofbreg.h,v 1.3 2007/01/07 15:13:52 miod Exp $	*/
 
 /*
@@ -65,7 +65,7 @@
 struct	diofbreg {
 	uint8_t		:8;
 	uint8_t		id;		/* id and reset register	0x01 */
-	uint8_t 	sec_interrupt;	/* secondary interrupt register	0x02 */
+	uint8_t		

CVS commit: src/sys/arch/hp300

2023-01-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 15 06:19:46 UTC 2023

Modified Files:
src/sys/arch/hp300/dev: dcm.c dcmreg.h diofbreg.h diofbvar.h dma.c
dnkbd.c dvbox.c frodoreg.h hpib.c mcclock_frodo.c rbox.c rboxreg.h
rtc.c sti_sgc.c topcatreg.h
src/sys/arch/hp300/hp300: autoconf.c machdep.c trap.c
src/sys/arch/hp300/include: bus.h cpu.h
src/sys/arch/hp300/stand/common: clock.c devopen.c hil.c ite_dumb.c
ite_sti.c machdep.c netio.c prf.c rd.c scsi.c scsireg.h sd.c
src/sys/arch/hp300/stand/inst: inst.c

Log Message:
TAB/space cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/hp300/dev/dcm.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/dev/dcmreg.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/diofbreg.h \
src/sys/arch/hp300/dev/diofbvar.h src/sys/arch/hp300/dev/dvbox.c \
src/sys/arch/hp300/dev/rbox.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/hp300/dev/dma.c \
src/sys/arch/hp300/dev/hpib.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/dev/dnkbd.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp300/dev/frodoreg.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/mcclock_frodo.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/rboxreg.h \
src/sys/arch/hp300/dev/topcatreg.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp300/dev/rtc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp300/dev/sti_sgc.c
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/hp300/hp300/autoconf.c
cvs rdiff -u -r1.237 -r1.238 src/sys/arch/hp300/hp300/machdep.c
cvs rdiff -u -r1.155 -r1.156 src/sys/arch/hp300/hp300/trap.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp300/include/bus.h
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/hp300/include/cpu.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/stand/common/clock.c \
src/sys/arch/hp300/stand/common/devopen.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hp300/stand/common/hil.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/stand/common/ite_dumb.c \
src/sys/arch/hp300/stand/common/ite_sti.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hp300/stand/common/machdep.c \
src/sys/arch/hp300/stand/common/rd.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hp300/stand/common/netio.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp300/stand/common/prf.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/stand/common/scsi.c \
src/sys/arch/hp300/stand/common/sd.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp300/stand/common/scsireg.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hp300/stand/inst/inst.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/xlint/lint1

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jan 15 00:05:38 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: make read_until_parent easier to understand

Previously, the '--level' in the loop condition looked as if it applied
more often than it really does.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.425 -r1.426 src/usr.bin/xlint/lint1/cgram.y

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/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.425 src/usr.bin/xlint/lint1/cgram.y:1.426
--- src/usr.bin/xlint/lint1/cgram.y:1.425	Sat Jan 14 10:33:34 2023
+++ src/usr.bin/xlint/lint1/cgram.y	Sun Jan 15 00:05:38 2023
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.425 2023/01/14 10:33:34 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.426 2023/01/15 00:05:38 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.425 2023/01/14 10:33:34 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.426 2023/01/15 00:05:38 rillig Exp $");
 #endif
 
 #include 
@@ -2146,12 +2146,11 @@ read_until_rparen(void)
 	freeyyv(, yychar);
 
 	level = 1;
-	while (yychar != T_RPAREN || --level > 0) {
-		if (yychar == T_LPAREN) {
+	while (yychar > 0) {
+		if (yychar == T_LPAREN)
 			level++;
-		} else if (yychar <= 0) {
+		if (yychar == T_RPAREN && --level == 0)
 			break;
-		}
 		freeyyv(, yychar = yylex());
 	}
 



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

2023-01-14 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jan 15 00:05:38 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: make read_until_parent easier to understand

Previously, the '--level' in the loop condition looked as if it applied
more often than it really does.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.425 -r1.426 src/usr.bin/xlint/lint1/cgram.y

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



CVS commit: src/sys/arch/luna68k

2023-01-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 15 05:08:33 UTC 2023

Modified Files:
src/sys/arch/luna68k/dev: lcd.c lunaws.c omkbdmap.c omrasops.c
psgpam_enc.c siotty.c xp.c
src/sys/arch/luna68k/include: bus.h cpu.h lcd.h param.h vmparam.h
src/sys/arch/luna68k/luna68k: disksubr.c mainbus.c pmap_bootstrap.c
trap.c

Log Message:
TAB/space/indent cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/luna68k/dev/lcd.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/luna68k/dev/lunaws.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/luna68k/dev/omkbdmap.c \
src/sys/arch/luna68k/dev/psgpam_enc.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/luna68k/dev/omrasops.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/luna68k/dev/siotty.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/luna68k/dev/xp.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/luna68k/include/bus.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/luna68k/include/cpu.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/luna68k/include/lcd.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/luna68k/include/param.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/luna68k/include/vmparam.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/luna68k/luna68k/disksubr.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/luna68k/luna68k/mainbus.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/luna68k/luna68k/trap.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/luna68k

2023-01-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 15 05:08:33 UTC 2023

Modified Files:
src/sys/arch/luna68k/dev: lcd.c lunaws.c omkbdmap.c omrasops.c
psgpam_enc.c siotty.c xp.c
src/sys/arch/luna68k/include: bus.h cpu.h lcd.h param.h vmparam.h
src/sys/arch/luna68k/luna68k: disksubr.c mainbus.c pmap_bootstrap.c
trap.c

Log Message:
TAB/space/indent cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/luna68k/dev/lcd.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/luna68k/dev/lunaws.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/luna68k/dev/omkbdmap.c \
src/sys/arch/luna68k/dev/psgpam_enc.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/luna68k/dev/omrasops.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/luna68k/dev/siotty.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/luna68k/dev/xp.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/luna68k/include/bus.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/luna68k/include/cpu.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/luna68k/include/lcd.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/luna68k/include/param.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/luna68k/include/vmparam.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/luna68k/luna68k/disksubr.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/luna68k/luna68k/mainbus.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/luna68k/luna68k/trap.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/luna68k/dev/lcd.c
diff -u src/sys/arch/luna68k/dev/lcd.c:1.12 src/sys/arch/luna68k/dev/lcd.c:1.13
--- src/sys/arch/luna68k/dev/lcd.c:1.12	Tue Dec 29 17:17:14 2020
+++ src/sys/arch/luna68k/dev/lcd.c	Sun Jan 15 05:08:33 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lcd.c,v 1.12 2020/12/29 17:17:14 tsutsui Exp $ */
+/* $NetBSD: lcd.c,v 1.13 2023/01/15 05:08:33 tsutsui Exp $ */
 /* $OpenBSD: lcd.c,v 1.7 2015/02/10 22:42:35 miod Exp $ */
 
 /*-
@@ -32,7 +32,7 @@
 
 #include 		/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lcd.c,v 1.12 2020/12/29 17:17:14 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lcd.c,v 1.13 2023/01/15 05:08:33 tsutsui Exp $");
 
 #include 
 #include 
@@ -297,7 +297,7 @@ lcdbusywait(void)
 	s = splhigh();
 	p1->portC = POWER | READ_BUSY | DISABLE;
 	splx(s);
-}	
+}
 
 static void
 lcdput(int cc)

Index: src/sys/arch/luna68k/dev/lunaws.c
diff -u src/sys/arch/luna68k/dev/lunaws.c:1.41 src/sys/arch/luna68k/dev/lunaws.c:1.42
--- src/sys/arch/luna68k/dev/lunaws.c:1.41	Sat Jun 25 01:54:37 2022
+++ src/sys/arch/luna68k/dev/lunaws.c	Sun Jan 15 05:08:33 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lunaws.c,v 1.41 2022/06/25 01:54:37 tsutsui Exp $ */
+/* $NetBSD: lunaws.c,v 1.42 2023/01/15 05:08:33 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.41 2022/06/25 01:54:37 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.42 2023/01/15 05:08:33 tsutsui Exp $");
 
 #include "opt_wsdisplay_compat.h"
 #include "wsmouse.h"
@@ -525,7 +525,7 @@ omkbd_get_buzcmd(struct ws_softc *sc, st
 		buzcmd |= OMKBD_BUZZER_150HZ;
 	else
 		buzcmd |= OMKBD_BUZZER_100HZ;
-		
+
 	/* no volume control for buzzer on the LUNA keyboards */
 
 	return buzcmd;

Index: src/sys/arch/luna68k/dev/omkbdmap.c
diff -u src/sys/arch/luna68k/dev/omkbdmap.c:1.2 src/sys/arch/luna68k/dev/omkbdmap.c:1.3
--- src/sys/arch/luna68k/dev/omkbdmap.c:1.2	Sat Oct  4 14:42:41 2014
+++ src/sys/arch/luna68k/dev/omkbdmap.c	Sun Jan 15 05:08:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: omkbdmap.c,v 1.2 2014/10/04 14:42:41 tsutsui Exp $	*/
+/*	$NetBSD: omkbdmap.c,v 1.3 2023/01/15 05:08:33 tsutsui Exp $	*/
 /*	$OpenBSD: omkbdmap.c,v 1.2 2013/11/16 18:31:44 miod Exp $	*/
 
 /* Partially from:
@@ -97,9 +97,9 @@ const uint8_t omkbd_raw[0x80] = {
 	0x0c,		/* 0x2c: equal */
 	0x0d,		/* 0x2d: asciitilde */
 	0x7d,		/* 0x2e: bar */
-	0x00, 		/* 0x2f */
-	0x00, 		/* 0x30: f13 */
-	0x00, 		/* 0x31: f14 */
+	0x00,		/* 0x2f */
+	0x00,		/* 0x30: f13 */
+	0x00,		/* 0x31: f14 */
 	0x10,		/* 0x32 */
 	0x11,		/* 0x33 */
 	0x12,		/* 0x34 */
@@ -207,7 +207,7 @@ static const keysym_t omkbd_keydesc_jp[]
 	KC(0x1d),			KS_KP_Left,
 	KC(0x1e),			KS_KP_Right,
 	KC(0x1f),			KS_KP_Down,
-	/* 0x20, 			KS_f11, */
+	/* 0x20,			KS_f11, */
 	/* 0x21,			KS_f12, */
 	KC(0x22),			KS_1,		KS_exclam,
 	KC(0x23),			KS_2,		KS_quotedbl,
Index: src/sys/arch/luna68k/dev/psgpam_enc.c
diff -u src/sys/arch/luna68k/dev/psgpam_enc.c:1.2 src/sys/arch/luna68k/dev/psgpam_enc.c:1.3
--- src/sys/arch/luna68k/dev/psgpam_enc.c:1.2	Sat Oct  1 13:41:12 2022
+++ src/sys/arch/luna68k/dev/psgpam_enc.c	Sun Jan 15 05:08:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: psgpam_enc.c,v 1.2 2022/10/01 13:41:12 tsutsui Exp $	*/
+/*	$NetBSD: psgpam_enc.c,v 1.3 2023/01/15 05:08:33 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2018 Yosuke