Module Name:    src
Committed By:   christos
Date:           Mon Mar 24 18:56:43 UTC 2014

Modified Files:
        src/sys/arch/cesfic/cesfic: machdep.c
        src/sys/arch/cesfic/dev: zs.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/cesfic/cesfic/machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cesfic/dev/zs.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/cesfic/cesfic/machdep.c
diff -u src/sys/arch/cesfic/cesfic/machdep.c:1.64 src/sys/arch/cesfic/cesfic/machdep.c:1.65
--- src/sys/arch/cesfic/cesfic/machdep.c:1.64	Wed Aug  8 12:29:50 2012
+++ src/sys/arch/cesfic/cesfic/machdep.c	Mon Mar 24 14:56:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.64 2012/08/08 16:29:50 drochner Exp $	*/
+/*	$NetBSD: machdep.c,v 1.65 2014/03/24 18:56:43 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.64 2012/08/08 16:29:50 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.65 2014/03/24 18:56:43 christos Exp $");
 
 #include "opt_bufcache.h"
 #include "opt_ddb.h"
@@ -71,6 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include <sys/vnode.h>
 #include <sys/ksyms.h>
 #include <sys/module.h>
+#include <sys/cpu.h>
 #ifdef SYSVMSG
 #include <sys/msg.h>
 #endif
@@ -247,6 +248,7 @@ cpu_startup(void)
 	pmapdebug = 0;
 #endif
 
+	cpu_setmodel("FIC8234");
 	if (fputype != FPU_NONE)
 		m68k_make_fpu_idle_frame();
 
@@ -274,12 +276,11 @@ cpu_startup(void)
 /*
  * Info for CTL_HW
  */
-char	cpu_model[] = "FIC8234";
 
 void
 identifycpu(void)
 {
-	printf("%s\n", cpu_model);
+	printf("%s\n", cpu_getmodel());
 	printf("delay constant: %d\n", delay_divisor);
 }
 
@@ -510,6 +511,7 @@ badaddr(void *addr)
 		return (1);
 	}
 	i = *(volatile short *)addr;
+	__USE(i);
 	nofault = (int *) 0;
 	return (0);
 }
@@ -526,6 +528,7 @@ badbaddr(void *addr)
 		return (1);
 	}
 	i = *(volatile char *)addr;
+	__USE(i);
 	nofault = (int *) 0;
 	return (0);
 }

Index: src/sys/arch/cesfic/dev/zs.c
diff -u src/sys/arch/cesfic/dev/zs.c:1.18 src/sys/arch/cesfic/dev/zs.c:1.19
--- src/sys/arch/cesfic/dev/zs.c:1.18	Mon Oct 26 15:16:55 2009
+++ src/sys/arch/cesfic/dev/zs.c	Mon Mar 24 14:56:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.18 2009/10/26 19:16:55 cegger Exp $	*/
+/*	$NetBSD: zs.c,v 1.19 2014/03/24 18:56:43 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.18 2009/10/26 19:16:55 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.19 2014/03/24 18:56:43 christos Exp $");
 
 #include "opt_ddb.h"
 
@@ -271,16 +271,16 @@ zs_write_data(struct zs_chanstate *cs, u
 int
 zs_set_speed(struct zs_chanstate *cs, int bps)
 {
-	int tconst, real_bps;
+	int tconst;
 
 	tconst = BPS_TO_TCONST(cs->cs_brg_clk, bps);
 
 	if (tconst < 0)
 		return (EINVAL);
 
-	/* Convert back to make sure we can do it. */
-	real_bps = TCONST_TO_BPS(cs->cs_brg_clk, tconst);
 #if 0
+	/* Convert back to make sure we can do it. */
+	int real_bps = TCONST_TO_BPS(cs->cs_brg_clk, tconst);
 	/* XXX - Allow some tolerance here? */
 	if (real_bps != bps)
 		return (EINVAL);

Reply via email to