changeset 23904:6c4f74fe69e1

13394 fhc: case value '4294967295' not in enumerated type Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Toomas Soome <tsoome@me.com>
date Mon, 13 Apr 2020 10:10:07 +0300
parents a87c414f8206
children 2de168d8ace1
files usr/src/uts/sun4u/sunfire/io/fhc_bd.c usr/src/uts/sun4u/sunfire/io/jtag.c usr/src/uts/sun4u/sunfire/sys/fhc.h
diffstat 3 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/sun4u/sunfire/io/fhc_bd.c	Thu Dec 24 12:58:49 2020 -0800
+++ b/usr/src/uts/sun4u/sunfire/io/fhc_bd.c	Mon Apr 13 10:10:07 2020 +0300
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/conf.h>
 #include <sys/ddi.h>
@@ -768,7 +766,7 @@
 
 			type = jtag_get_board_type(jtm->jtag_cmd, sc);
 			switch (type) {
-			case -1:
+			case EMPTY_BOARD:
 				fhc_bd_sc_evt(sc, SYSC_EVT_BD_EMPTY);
 				continue;
 			case DISK_BOARD:
--- a/usr/src/uts/sun4u/sunfire/io/jtag.c	Thu Dec 24 12:58:49 2020 -0800
+++ b/usr/src/uts/sun4u/sunfire/io/jtag.c	Mon Apr 13 10:10:07 2020 +0300
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/ddi.h>
@@ -1165,7 +1163,7 @@
 /*
  * Returns (positive) board type if something detected, including
  * UNKNOWN_BOARD.
- * Returns -1 if nothing there.
+ * Returns EMPTY_BOARD if nothing there.
  */
 enum board_type
 jtag_get_board_type(volatile u_int *jreg, sysc_cfga_stat_t *sc)
@@ -1261,7 +1259,7 @@
 		break;
 
 	case RING_BROKEN:
-		result = -1;
+		result = EMPTY_BOARD;
 		break;
 
 	default:
--- a/usr/src/uts/sun4u/sunfire/sys/fhc.h	Thu Dec 24 12:58:49 2020 -0800
+++ b/usr/src/uts/sun4u/sunfire/sys/fhc.h	Mon Apr 13 10:10:07 2020 +0300
@@ -27,8 +27,6 @@
 #ifndef	_SYS_FHC_H
 #define	_SYS_FHC_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
@@ -486,6 +484,7 @@
  * boards. It is used by both the kernel and user programs.
  */
 enum board_type {
+	EMPTY_BOARD = -1,
 	UNINIT_BOARD = 0,		/* Uninitialized board type */
 	UNKNOWN_BOARD,			/* Unknown board type */
 	CPU_BOARD,			/* System board CPU(s) */