Module Name:    src
Committed By:   christos
Date:           Mon Mar 24 20:01:03 UTC 2014

Modified Files:
        src/sys/arch/next68k/dev: mb8795.c nextkbd.c
        src/sys/arch/next68k/next68k: machdep.c rtc.c trap.c

Log Message:
- use cpu_{g,s}etmodel
- fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/next68k/dev/mb8795.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/next68k/dev/nextkbd.c
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/next68k/next68k/machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/next68k/next68k/rtc.c
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/next68k/next68k/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/next68k/dev/mb8795.c
diff -u src/sys/arch/next68k/dev/mb8795.c:1.51 src/sys/arch/next68k/dev/mb8795.c:1.52
--- src/sys/arch/next68k/dev/mb8795.c:1.51	Sat Oct 27 13:18:05 2012
+++ src/sys/arch/next68k/dev/mb8795.c	Mon Mar 24 16:01:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mb8795.c,v 1.51 2012/10/27 17:18:05 chs Exp $	*/
+/*	$NetBSD: mb8795.c,v 1.52 2014/03/24 20:01:03 christos Exp $	*/
 /*
  * Copyright (c) 1998 Darrin B. Jewell
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mb8795.c,v 1.51 2012/10/27 17:18:05 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mb8795.c,v 1.52 2014/03/24 20:01:03 christos Exp $");
 
 #include "opt_inet.h"
 
@@ -254,6 +254,7 @@ mb8795_rint(struct mb8795_softc *sc)
 
 	rxstat = MB_READ_REG(sc, MB8795_RXSTAT);
 	rxmask = MB_READ_REG(sc, MB8795_RXMASK);
+	__USE(rxmask);
 
 	MB_WRITE_REG(sc, MB8795_RXSTAT, MB8795_RXSTAT_CLEAR);
 
@@ -376,6 +377,7 @@ mb8795_tint(struct mb8795_softc *sc)
 	panic ("tint");
 	txstat = MB_READ_REG(sc, MB8795_TXSTAT);
 	txmask = MB_READ_REG(sc, MB8795_TXMASK);
+	__USE(txmask);
 
 	if ((txstat & MB8795_TXSTAT_READY) ||
 	    (txstat & MB8795_TXSTAT_TXRECV)) {
@@ -764,6 +766,7 @@ mb8795_start_dma(struct mb8795_softc *sc
 
 	MB_WRITE_REG(sc, MB8795_TXSTAT, MB8795_TXSTAT_CLEAR);
 	txmask = MB_READ_REG(sc, MB8795_TXMASK);
+	__USE(txmask);
 	/* MB_WRITE_REG(sc, MB8795_TXMASK, txmask | MB8795_TXMASK_READYIE); */
 	/* MB_WRITE_REG(sc, MB8795_TXMASK, txmask | MB8795_TXMASK_TXRXIE); */
 

Index: src/sys/arch/next68k/dev/nextkbd.c
diff -u src/sys/arch/next68k/dev/nextkbd.c:1.14 src/sys/arch/next68k/dev/nextkbd.c:1.15
--- src/sys/arch/next68k/dev/nextkbd.c:1.14	Sat Oct 27 13:18:07 2012
+++ src/sys/arch/next68k/dev/nextkbd.c	Mon Mar 24 16:01:03 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: nextkbd.c,v 1.14 2012/10/27 17:18:07 chs Exp $ */
+/* $NetBSD: nextkbd.c,v 1.15 2014/03/24 20:01:03 christos Exp $ */
 /*
  * Copyright (c) 1998 Matt DeBergalis
  * All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nextkbd.c,v 1.14 2012/10/27 17:18:07 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nextkbd.c,v 1.15 2014/03/24 20:01:03 christos Exp $");
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
@@ -331,7 +331,7 @@ static int
 nextkbd_read_data(struct nextkbd_internal *id)
 {
 	unsigned char device;
-	struct mon_regs stat;
+	struct mon_regs stat = { 0 };
 				
 	bus_space_read_region_4(id->iot, id->ioh, 0, &stat, 3);
 	if ((stat.mon_csr & CSR_INT) && (stat.mon_csr & CSR_DATA)) {

Index: src/sys/arch/next68k/next68k/machdep.c
diff -u src/sys/arch/next68k/next68k/machdep.c:1.110 src/sys/arch/next68k/next68k/machdep.c:1.111
--- src/sys/arch/next68k/next68k/machdep.c:1.110	Mon Mar 24 15:58:04 2014
+++ src/sys/arch/next68k/next68k/machdep.c	Mon Mar 24 16:01:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.111 2014/03/24 20:01:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1998 Darrin B. Jewell
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.111 2014/03/24 20:01:03 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -74,6 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include <sys/kgdb.h>
 #endif
 #include <sys/boot_flag.h>
+#include <sys/cpu.h>
 
 #include <uvm/uvm_extern.h>
 
@@ -314,10 +315,7 @@ cpu_startup(void)
 void
 identifycpu(void)
 {
-/*###317 [cc] error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token%%%*/
-	const char *mc, *mmu_str *fpu_str, *cache_str;
-/*###318 [cc] error: unused variable 'len' [-Werror=unused-variable]%%%*/
-	int len;
+	const char *mc, *mmu_str, *fpu_str, *cache_str;
 
 	/*
 	 * ...and the CPU type.
@@ -343,8 +341,6 @@ identifycpu(void)
 	switch (mmutype) {
 	case MMU_68040:
 	case MMU_68030:
-/*###344 [cc] error: 'mmu_str' undeclared (first use in this function)%%%*/
-/*###344 [cc] note: each undeclared identifier is reported only once for each function it appears in%%%*/
 		mmu_str = "+MMU";
 		break;
 	case MMU_68851:
@@ -363,7 +359,6 @@ identifycpu(void)
 	 */
 	switch (fputype) {
 	case FPU_68040:
-/*###362 [cc] error: 'fpu_str' undeclared (first use in this function)%%%*/
 		fpu_str = "+FPU";
 		break;
 	case FPU_68882:
@@ -380,7 +375,6 @@ identifycpu(void)
 	 * ...and finally, the cache type.
 	 */
 	if (cputype == CPU_68040)
-/*###378 [cc] error: 'cache_str' undeclared (first use in this function)%%%*/
 		cache_str = ", 4k on-chip physical I/D caches";
 	else {
 #if defined(ENABLE_HP_CODE)
@@ -400,10 +394,7 @@ identifycpu(void)
 #endif
 	}
 
-/*###397 [cc] error: implicit declaration of function 'cpu_setmodel' [-Werror=implicit-function-declaration]%%%*/
 	cpu_setmodel("NeXT/MC680%s CPU%s%s%s", mc, mmu_str, fpu_str, cache_str);
-/*###398 [cc] error: implicit declaration of function 'cpu_getmodel' [-Werror=implicit-function-declaration]%%%*/
-/*###398 [cc] error: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Werror=format=]%%%*/
 	printf("%s\n", cpu_getmodel());
 
 	return;

Index: src/sys/arch/next68k/next68k/rtc.c
diff -u src/sys/arch/next68k/next68k/rtc.c:1.16 src/sys/arch/next68k/next68k/rtc.c:1.17
--- src/sys/arch/next68k/next68k/rtc.c:1.16	Mon Mar 24 15:58:04 2014
+++ src/sys/arch/next68k/next68k/rtc.c	Mon Mar 24 16:01:03 2014
@@ -1,4 +1,4 @@
-/*      $NetBSD: rtc.c,v 1.16 2014/03/24 19:58:04 christos Exp $        */
+/*      $NetBSD: rtc.c,v 1.17 2014/03/24 20:01:03 christos Exp $        */
 /*
  * Copyright (c) 1998 Darrin Jewell
  * Copyright (c) 1997 Rolf Grossmann 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.16 2014/03/24 19:58:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.17 2014/03/24 20:01:03 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>          /* for panic */
@@ -272,8 +272,6 @@ gettime_old(todr_chip_handle_t tch, stru
 {
 	u_char h, y;
 	
-/*###275 [cc] error: variable 'val' set but not used [-Werror=unused-but-set-variable]%%%*/
-	struct clock_ymdhms val;
 	y = FROMBCD(rtc_read(RTC_YR));
 	if (y >= 69) {
 		dt->dt_year = 1900+y;
@@ -293,8 +291,11 @@ gettime_old(todr_chip_handle_t tch, stru
 		} else {  /* am */
 			if (dt->dt_hour == 12) dt->dt_hour = 0;
 		}
+#ifdef notdef
 	} else {	/* time is 24 hour format */
+		struct clock_ymdhms val;
 		val.dt_hour = FROMBCD(h & 0x3f);
+#endif
 	}
 
 	dt->dt_min	= FROMBCD(rtc_read(RTC_MIN)&0x7f);

Index: src/sys/arch/next68k/next68k/trap.c
diff -u src/sys/arch/next68k/next68k/trap.c:1.86 src/sys/arch/next68k/next68k/trap.c:1.87
--- src/sys/arch/next68k/next68k/trap.c:1.86	Mon Mar 24 15:58:04 2014
+++ src/sys/arch/next68k/next68k/trap.c	Mon Mar 24 16:01:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.86 2014/03/24 19:58:04 christos Exp $	*/
+/*	$NetBSD: trap.c,v 1.87 2014/03/24 20:01:03 christos Exp $	*/
 
 /*
  * This file was taken from mvme68k/mvme68k/trap.c
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.86 2014/03/24 19:58:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.87 2014/03/24 20:01:03 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -270,8 +270,7 @@ trap(struct frame *fp, int type, unsigne
 	int s;
 	int rv;
 	u_quad_t sticks = 0 /* XXX initialiser works around compiler bug */;
-/*###273 [cc] error: variable 'panicking' set but not used [-Werror=unused-but-set-variable]%%%*/
-	static int panicking = 0;
+	static int panicking __diagused;
 
 	curcpu()->ci_data.cpu_ntrap++;
 	l = curlwp;

Reply via email to