Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/newsmips - fix unused
details: https://anonhg.NetBSD.org/src/rev/36e426124848
branches: trunk
changeset: 328049:36e426124848
user: christos <christos%NetBSD.org@localhost>
date: Mon Mar 24 20:05:20 2014 +0000
description:
- fix unused
- use cpu_{g,s}etmodel
diffstat:
sys/arch/newsmips/apbus/apbus_subr.c | 8 ++------
sys/arch/newsmips/dev/scsi_1185.c | 6 ++++--
sys/arch/newsmips/newsmips/autoconf.c | 7 +++----
sys/arch/newsmips/newsmips/machdep.c | 27 ++++++++++++++-------------
sys/arch/newsmips/newsmips/news3400.c | 5 +++--
5 files changed, 26 insertions(+), 27 deletions(-)
diffs (197 lines):
diff -r 53cf41edd172 -r 36e426124848 sys/arch/newsmips/apbus/apbus_subr.c
--- a/sys/arch/newsmips/apbus/apbus_subr.c Mon Mar 24 20:01:03 2014 +0000
+++ b/sys/arch/newsmips/apbus/apbus_subr.c Mon Mar 24 20:05:20 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apbus_subr.c,v 1.8 2008/04/09 15:40:30 tsutsui Exp $ */
+/* $NetBSD: apbus_subr.c,v 1.9 2014/03/24 20:05:20 christos Exp $ */
/*-
* Copyright (C) 1999 SHIMIZU Ryo. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apbus_subr.c,v 1.8 2008/04/09 15:40:30 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apbus_subr.c,v 1.9 2014/03/24 20:05:20 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -74,15 +74,11 @@
static void
apctl_dump(struct apbus_ctl *apctl)
{
- unsigned int *p;
-
if (!apctl)
return;
printf(" apbus_ctl dump (%p)\n", apctl);
- p = (void *)apctl;
-
printf(" Num: %d\n", apctl->apbc_ctlno);
printf(" HWaddr: 0x%08x\n", apctl->apbc_hwbase);
printf(" softc: %p\n", apctl->apbc_softc);
diff -r 53cf41edd172 -r 36e426124848 sys/arch/newsmips/dev/scsi_1185.c
--- a/sys/arch/newsmips/dev/scsi_1185.c Mon Mar 24 20:01:03 2014 +0000
+++ b/sys/arch/newsmips/dev/scsi_1185.c Mon Mar 24 20:05:20 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsi_1185.c,v 1.20 2011/02/20 07:56:31 matt Exp $ */
+/* $NetBSD: scsi_1185.c,v 1.21 2014/03/24 20:05:20 christos Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.20 2011/02/20 07:56:31 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.21 2014/03/24 20:05:20 christos Exp $");
#define __INTR_PRIVATE
#include <sys/param.h>
@@ -568,8 +568,10 @@
int volatile cmonr;
statr = sc_statr;
+ __USE(statr);
DMAC_WAIT0;
cmonr = sc_cmonr;
+ __USE(cmonr);
sc->int_stat2 &= ~R3_SPE;
sc->perr_flag[sc->ip->chan_num] = 1;
}
diff -r 53cf41edd172 -r 36e426124848 sys/arch/newsmips/newsmips/autoconf.c
--- a/sys/arch/newsmips/newsmips/autoconf.c Mon Mar 24 20:01:03 2014 +0000
+++ b/sys/arch/newsmips/newsmips/autoconf.c Mon Mar 24 20:05:20 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.37 2012/10/13 06:25:20 tsutsui Exp $ */
+/* $NetBSD: autoconf.c,v 1.38 2014/03/24 20:05:20 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -49,7 +49,7 @@
#define __INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.37 2012/10/13 06:25:20 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.38 2014/03/24 20:05:20 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -126,14 +126,13 @@
static void
findroot(void)
{
- int ctlr, unit, part, type;
+ int ctlr, part, type;
device_t dv;
if (BOOTDEV_MAG(bootdev) != 5) /* NEWS-OS's B_DEVMAGIC */
return;
ctlr = BOOTDEV_CTLR(bootdev); /* SCSI ID */
- unit = BOOTDEV_UNIT(bootdev);
part = BOOTDEV_PART(bootdev); /* LUN */
type = BOOTDEV_TYPE(bootdev);
diff -r 53cf41edd172 -r 36e426124848 sys/arch/newsmips/newsmips/machdep.c
--- a/sys/arch/newsmips/newsmips/machdep.c Mon Mar 24 20:01:03 2014 +0000
+++ b/sys/arch/newsmips/newsmips/machdep.c Mon Mar 24 20:05:20 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.114 2012/07/28 23:08:57 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.115 2014/03/24 20:05:20 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.114 2012/07/28 23:08:57 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.115 2014/03/24 20:05:20 christos Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@@ -148,6 +148,7 @@
{
u_long first, last;
char *kernend;
+ const char *model;
struct btinfo_magic *bi_magic;
struct btinfo_bootarg *bi_arg;
struct btinfo_systype *bi_systype;
@@ -314,18 +315,18 @@
#ifdef news3400
case NEWS3400:
news3400_init();
- strcpy(cpu_model, idrom.id_machine);
- if (strcmp(cpu_model, "news3400") == 0 ||
- strcmp(cpu_model, "news3200") == 0 ||
- strcmp(cpu_model, "news3700") == 0) {
+ cpu_setmodel("%s", idrom.id_machine);
+ model = cpu_getmodel();
+ if (strcmp(model, "news3400") == 0 ||
+ strcmp(model, "news3200") == 0 ||
+ strcmp(model, "news3700") == 0) {
/*
* Set up interrupt handling and I/O addresses.
*/
hardware_intr = news3400_intr;
cpuspeed = 10;
} else {
- printf("kernel not configured for machine %s\n",
- cpu_model);
+ printf("kernel not configured for machine %s\n", model);
}
break;
#endif
@@ -333,17 +334,17 @@
#ifdef news5000
case NEWS5000:
news5000_init();
- strcpy(cpu_model, idrom.id_machine);
- if (strcmp(cpu_model, "news5000") == 0 ||
- strcmp(cpu_model, "news5900") == 0) {
+ cpu_setmodel("%s", idrom.id_machine);
+ model = cpu_getmodel();
+ if (strcmp(model, "news5000") == 0 ||
+ strcmp(model, "news5900") == 0) {
/*
* Set up interrupt handling and I/O addresses.
*/
hardware_intr = news5000_intr;
cpuspeed = 50; /* ??? XXX */
} else {
- printf("kernel not configured for machine %s\n",
- cpu_model);
+ printf("kernel not configured for machine %s\n", model);
}
break;
#endif
diff -r 53cf41edd172 -r 36e426124848 sys/arch/newsmips/newsmips/news3400.c
--- a/sys/arch/newsmips/newsmips/news3400.c Mon Mar 24 20:01:03 2014 +0000
+++ b/sys/arch/newsmips/newsmips/news3400.c Mon Mar 24 20:05:20 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: news3400.c,v 1.22 2011/03/10 15:40:36 tsutsui Exp $ */
+/* $NetBSD: news3400.c,v 1.23 2014/03/24 20:05:20 christos Exp $ */
/*-
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: news3400.c,v 1.22 2011/03/10 15:40:36 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: news3400.c,v 1.23 2014/03/24 20:05:20 christos Exp $");
#define __INTR_PRIVATE
#include <sys/param.h>
@@ -221,6 +221,7 @@
x = *(volatile uint32_t *)addr;
break;
}
+ __USE(x);
/* also check CPU INT4 here for bus errors during splhigh() */
if (badaddr_flag == 0) {
Home |
Main Index |
Thread Index |
Old Index