Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Eliminate more commons or redundant declarations.
details: https://anonhg.NetBSD.org/src/rev/850a7dc3e2b5
branches: trunk
changeset: 526924:850a7dc3e2b5
user: matt <matt%NetBSD.org@localhost>
date: Tue May 14 02:58:32 2002 +0000
description:
Eliminate more commons or redundant declarations.
diffstat:
sys/arch/cesfic/cesfic/machdep.c | 3 +--
sys/arch/hp300/dev/scsireg.h | 14 +++++++++++---
sys/arch/i386/i386/db_interface.c | 5 ++---
sys/arch/sun2/sun2/trap.c | 8 ++++++--
sys/arch/sun3/include/cpu.h | 8 ++++++--
sys/arch/sun3/sun3/machdep.c | 4 +++-
sys/arch/sun3/sun3/trap.c | 8 ++++++--
sys/dev/ic/osiopvar.h | 4 ++--
sys/kern/kern_sysctl.c | 6 +++---
sys/netinet6/ip6_mroute.c | 18 +++++++++---------
10 files changed, 49 insertions(+), 29 deletions(-)
diffs (truncated from 302 to 300 lines):
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/arch/cesfic/cesfic/machdep.c
--- a/sys/arch/cesfic/cesfic/machdep.c Tue May 14 02:46:22 2002 +0000
+++ b/sys/arch/cesfic/cesfic/machdep.c Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.6 2002/03/20 17:59:23 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.7 2002/05/14 02:58:35 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -120,7 +120,6 @@
* Declare these as initialized data so we can patch them.
*/
caddr_t msgbufaddr;
-int msgbufmapped; /* set when safe to use msgbuf */
/*int maxmem;*/ /* max memory per process */
int physmem = MAXMEM; /* max supported memory, changes to actual */
/*
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/arch/hp300/dev/scsireg.h
--- a/sys/arch/hp300/dev/scsireg.h Tue May 14 02:46:22 2002 +0000
+++ b/sys/arch/hp300/dev/scsireg.h Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsireg.h,v 1.4 1994/10/26 07:24:59 cgd Exp $ */
+/* $NetBSD: scsireg.h,v 1.5 2002/05/14 02:58:35 matt Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -294,7 +294,11 @@
unsigned head : 8;
long bytes_from_index;
} defect[127];
-} format_parms;
+};
+
+#ifdef _KERNEL
+extern struct scsi_format_parms format_parms;
+#endif
struct scsi_reassign_parms {
u_short reserved;
@@ -302,7 +306,11 @@
struct new_defect {
unsigned lba; /* logical block address */
} new_defect[2];
-} reassign_parms;
+};
+
+#ifdef _KERNEL
+extern struct scsi_reassign_parms reassign_parms;
+#endif
struct scsi_modesel_hdr {
u_char rsvd1;
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/arch/i386/i386/db_interface.c
--- a/sys/arch/i386/i386/db_interface.c Tue May 14 02:46:22 2002 +0000
+++ b/sys/arch/i386/i386/db_interface.c Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.34 2002/05/12 23:16:53 matt Exp $ */
+/* $NetBSD: db_interface.c,v 1.35 2002/05/14 02:58:35 matt Exp $ */
/*
* Mach Operating System
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.34 2002/05/12 23:16:53 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.35 2002/05/14 02:58:35 matt Exp $");
#include "opt_ddb.h"
@@ -56,7 +56,6 @@
#include <ddb/db_output.h>
#include <ddb/ddbvar.h>
-extern label_t *db_recover;
extern char *trap_type[];
extern int trap_types;
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/arch/sun2/sun2/trap.c
--- a/sys/arch/sun2/sun2/trap.c Tue May 14 02:46:22 2002 +0000
+++ b/sys/arch/sun2/sun2/trap.c Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.6 2002/02/14 07:08:17 chs Exp $ */
+/* $NetBSD: trap.c,v 1.7 2002/05/14 02:58:34 matt Exp $ */
/*
* Copyright (c) 1994 Gordon W. Ross
@@ -66,7 +66,6 @@
#include <uvm/uvm_extern.h>
#include <machine/cpu.h>
-#include <machine/db_machdep.h>
#include <machine/endian.h>
#include <machine/psl.h>
#include <machine/trap.h>
@@ -76,6 +75,11 @@
#include <sun2/sun2/fc.h>
#include <sun2/sun2/machdep.h>
+#ifdef DDB
+#include <machine/db_machdep.h>
+#include <ddb/db_extern.h>
+#endif
+
#ifdef COMPAT_SUNOS
#include <compat/sunos/sunos_syscall.h>
extern struct emul emul_sunos;
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/arch/sun3/include/cpu.h
--- a/sys/arch/sun3/include/cpu.h Tue May 14 02:46:22 2002 +0000
+++ b/sys/arch/sun3/include/cpu.h Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.29 2001/05/30 12:28:52 mrg Exp $ */
+/* $NetBSD: cpu.h,v 1.30 2002/05/14 02:58:34 matt Exp $ */
/*
* Copyright (c) 1994 Gordon W. Ross
@@ -143,7 +143,11 @@
union sun3sir {
int sir_any;
char sir_which[4];
-} sun3sir;
+};
+
+#ifdef _KERNEL
+extern union sun3sir sun3sir;
+#endif
#define SIR_NET 0
#define SIR_CLOCK 1
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/arch/sun3/sun3/machdep.c
--- a/sys/arch/sun3/sun3/machdep.c Tue May 14 02:46:22 2002 +0000
+++ b/sys/arch/sun3/sun3/machdep.c Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.154 2002/03/20 17:59:26 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.155 2002/05/14 02:58:34 matt Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@@ -114,6 +114,8 @@
/* Virtual page frame for /dev/mem (see mem.c) */
vaddr_t vmmap;
+union sun3sir sun3sir;
+
/*
* safepri is a safe priority for sleep to set for a spin-wait
* during autoconfiguration or after a panic.
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/arch/sun3/sun3/trap.c
--- a/sys/arch/sun3/sun3/trap.c Tue May 14 02:46:22 2002 +0000
+++ b/sys/arch/sun3/sun3/trap.c Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.104 2002/02/14 07:08:17 chs Exp $ */
+/* $NetBSD: trap.c,v 1.105 2002/05/14 02:58:34 matt Exp $ */
/*
* Copyright (c) 1994 Gordon W. Ross
@@ -66,7 +66,6 @@
#include <uvm/uvm_extern.h>
#include <machine/cpu.h>
-#include <machine/db_machdep.h>
#include <machine/endian.h>
#include <machine/psl.h>
#include <machine/trap.h>
@@ -75,6 +74,11 @@
#include <sun3/sun3/fc.h>
#include <sun3/sun3/machdep.h>
+#ifdef DDB
+#include <machine/db_machdep.h>
+#include <ddb/db_extern.h>
+#endif
+
#ifdef COMPAT_SUNOS
#include <compat/sunos/sunos_syscall.h>
extern struct emul emul_sunos;
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/dev/ic/osiopvar.h
--- a/sys/dev/ic/osiopvar.h Tue May 14 02:46:22 2002 +0000
+++ b/sys/dev/ic/osiopvar.h Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osiopvar.h,v 1.2 2001/11/18 14:50:11 tsutsui Exp $ */
+/* $NetBSD: osiopvar.h,v 1.3 2002/05/14 02:58:35 matt Exp $ */
/*
* Copyright (c) 2001 Izumi Tsutsui. All rights reserved.
@@ -189,7 +189,7 @@
int state; /* negotiation state */
u_int8_t sxfer; /* value for SXFER reg */
u_int8_t sbcl; /* value for SBCL reg */
-} tinfo_t;
+};
struct osiop_softc {
struct device sc_dev;
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c Tue May 14 02:46:22 2002 +0000
+++ b/sys/kern/kern_sysctl.c Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sysctl.c,v 1.107 2002/05/13 07:13:58 matt Exp $ */
+/* $NetBSD: kern_sysctl.c,v 1.108 2002/05/14 02:58:32 matt Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.107 2002/05/13 07:13:58 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.108 2002/05/14 02:58:32 matt Exp $");
#include "opt_ddb.h"
#include "opt_insecure.h"
@@ -642,7 +642,7 @@
struct ctldebug /* debug0, */ /* debug1, */ debug2, debug3, debug4;
struct ctldebug debug5, debug6, debug7, debug8, debug9;
struct ctldebug debug10, debug11, debug12, debug13, debug14;
-struct ctldebug /* debug15, */ debug16, debug17, debug18, debug19;
+struct ctldebug debug15, debug16, debug17, debug18, debug19;
static struct ctldebug *debugvars[CTL_DEBUG_MAXID] = {
&debug0, &debug1, &debug2, &debug3, &debug4,
&debug5, &debug6, &debug7, &debug8, &debug9,
diff -r ee3632cef8d1 -r 850a7dc3e2b5 sys/netinet6/ip6_mroute.c
--- a/sys/netinet6/ip6_mroute.c Tue May 14 02:46:22 2002 +0000
+++ b/sys/netinet6/ip6_mroute.c Tue May 14 02:58:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_mroute.c,v 1.27 2002/03/24 20:46:56 itojun Exp $ */
+/* $NetBSD: ip6_mroute.c,v 1.28 2002/05/14 02:58:33 matt Exp $ */
/* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */
/*
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.27 2002/03/24 20:46:56 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.28 2002/05/14 02:58:33 matt Exp $");
#include "opt_inet.h"
@@ -110,7 +110,7 @@
#define RTE_FOUND 0x2
struct mf6c *mf6ctable[MF6CTBLSIZ];
-u_char nexpire[MF6CTBLSIZ];
+u_char nexpire6[MF6CTBLSIZ];
static struct mif6 mif6table[MAXMIFS];
#ifdef MRT6DEBUG
u_int mrt6debug = 0; /* debug level */
@@ -407,7 +407,7 @@
ip6_mrouter_ver = cmd;
bzero((caddr_t)mf6ctable, sizeof(mf6ctable));
- bzero((caddr_t)nexpire, sizeof(nexpire));
+ bzero((caddr_t)nexpire6, sizeof(nexpire6));
pim6 = 0;/* used for stubbing out/in pim stuff */
@@ -734,7 +734,7 @@
rt->mf6c_wrong_if = 0;
rt->mf6c_expire = 0; /* Don't clean this guy up */
- nexpire[hash]--;
+ nexpire6[hash]--;
/* free packets Qed at the end of this entry */
for (rte = rt->mf6c_stall; rte != NULL; ) {
@@ -781,7 +781,7 @@
rt->mf6c_wrong_if = 0;
if (rt->mf6c_expire)
- nexpire[hash]--;
+ nexpire6[hash]--;
rt->mf6c_expire = 0;
}
}
@@ -1139,7 +1139,7 @@
rt->mf6c_mcastgrp.sin6_len = sizeof(struct sockaddr_in6);
rt->mf6c_mcastgrp.sin6_addr = ip6->ip6_dst;
rt->mf6c_expire = UPCALL_EXPIRE;
- nexpire[hash]++;
+ nexpire6[hash]++;
rt->mf6c_parent = MF6C_INCOMPLETE_PARENT;
/* link into table */
@@ -1193,7 +1193,7 @@
s = splsoftnet();
for (i = 0; i < MF6CTBLSIZ; i++) {
- if (nexpire[i] == 0)
+ if (nexpire6[i] == 0)
continue;
nptr = &mf6ctable[i];
while ((mfc = *nptr) != NULL) {
@@ -1223,7 +1223,7 @@
rte = n;
} while (rte != NULL);
mrt6stat.mrt6s_cache_cleanups++;
- nexpire[i]--;
+ nexpire6[i]--;
Home |
Main Index |
Thread Index |
Old Index