1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-08 09:39:38 +00:00

Staticize.

Unstaticize a function in scsi/scsi_base that was used, with an undocumented
option.
My last count on the LINT kernel shows:
Total symbols:  3647
unref symbols:   463
undef symbols:     4
1 ref symbols:  1751
2 ref symbols:   485
Approaching the pain threshold now.
This commit is contained in:
Poul-Henning Kamp 1995-12-17 21:23:44 +00:00
parent cd239a8a3e
commit 27a0b398a7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12913
14 changed files with 81 additions and 74 deletions

View File

@ -47,7 +47,7 @@
*/
/*
* $Id: if_ze.c,v 1.25 1995/12/05 02:01:16 davidg Exp $
* $Id: if_ze.c,v 1.26 1995/12/13 10:36:03 phk Exp $
*/
#include "ze.h"
@ -111,7 +111,7 @@
/*
* ze_softc: per line info and status
*/
struct ze_softc {
static struct ze_softc {
struct arpcom arpcom; /* ethernet common */

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.22 1995/12/06 13:27:37 phk Exp $
* $Id: kern_clock.c,v 1.23 1995/12/07 12:46:37 davidg Exp $
*/
/* Portions of this software are covered by the following: */
@ -83,13 +83,14 @@
static void initclocks __P((void *dummy));
SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
/* Does anybody else really care about these? */
struct callout *callfree, *callout, calltodo;
/* Does anybody else really care about these? (yes, machdep.c) */
static struct callout calltodo;
struct callout *callfree, *callout;
/* Some of these don't belong here, but it's easiest to concentrate them. */
long cp_time[CPUSTATES];
static long cp_time[CPUSTATES];
long dk_seek[DK_NDRIVE];
long dk_time[DK_NDRIVE];
static long dk_time[DK_NDRIVE];
long dk_wds[DK_NDRIVE];
long dk_wpms[DK_NDRIVE];
long dk_xfer[DK_NDRIVE];
@ -151,7 +152,7 @@ int profhz;
int profprocs;
int ticks;
static int psdiv, pscnt; /* prof => stat divider */
int psratio; /* ratio: prof / stat */
static int psratio; /* ratio: prof / stat */
volatile struct timeval time;
volatile struct timeval mono_time;
@ -221,10 +222,10 @@ long time_esterror = MAXPHASE; /* estimated error (us) */
* and to increase the time_maxerror as the time since last update
* increases.
*/
long time_phase = 0; /* phase offset (scaled us) */
static long time_phase = 0; /* phase offset (scaled us) */
long time_freq = 0; /* frequency offset (scaled ppm) */
long time_adj = 0; /* tick adjust (scaled 1 / hz) */
long time_reftime = 0; /* time at last adjustment (s) */
static long time_adj = 0; /* tick adjust (scaled 1 / hz) */
static long time_reftime = 0; /* time at last adjustment (s) */
#ifdef PPS_SYNC
/*

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.22 1995/12/06 13:27:37 phk Exp $
* $Id: kern_clock.c,v 1.23 1995/12/07 12:46:37 davidg Exp $
*/
/* Portions of this software are covered by the following: */
@ -83,13 +83,14 @@
static void initclocks __P((void *dummy));
SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
/* Does anybody else really care about these? */
struct callout *callfree, *callout, calltodo;
/* Does anybody else really care about these? (yes, machdep.c) */
static struct callout calltodo;
struct callout *callfree, *callout;
/* Some of these don't belong here, but it's easiest to concentrate them. */
long cp_time[CPUSTATES];
static long cp_time[CPUSTATES];
long dk_seek[DK_NDRIVE];
long dk_time[DK_NDRIVE];
static long dk_time[DK_NDRIVE];
long dk_wds[DK_NDRIVE];
long dk_wpms[DK_NDRIVE];
long dk_xfer[DK_NDRIVE];
@ -151,7 +152,7 @@ int profhz;
int profprocs;
int ticks;
static int psdiv, pscnt; /* prof => stat divider */
int psratio; /* ratio: prof / stat */
static int psratio; /* ratio: prof / stat */
volatile struct timeval time;
volatile struct timeval mono_time;
@ -221,10 +222,10 @@ long time_esterror = MAXPHASE; /* estimated error (us) */
* and to increase the time_maxerror as the time since last update
* increases.
*/
long time_phase = 0; /* phase offset (scaled us) */
static long time_phase = 0; /* phase offset (scaled us) */
long time_freq = 0; /* frequency offset (scaled ppm) */
long time_adj = 0; /* tick adjust (scaled 1 / hz) */
long time_reftime = 0; /* time at last adjustment (s) */
static long time_adj = 0; /* tick adjust (scaled 1 / hz) */
static long time_reftime = 0; /* time at last adjustment (s) */
#ifdef PPS_SYNC
/*

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.22 1995/12/06 13:27:37 phk Exp $
* $Id: kern_clock.c,v 1.23 1995/12/07 12:46:37 davidg Exp $
*/
/* Portions of this software are covered by the following: */
@ -83,13 +83,14 @@
static void initclocks __P((void *dummy));
SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
/* Does anybody else really care about these? */
struct callout *callfree, *callout, calltodo;
/* Does anybody else really care about these? (yes, machdep.c) */
static struct callout calltodo;
struct callout *callfree, *callout;
/* Some of these don't belong here, but it's easiest to concentrate them. */
long cp_time[CPUSTATES];
static long cp_time[CPUSTATES];
long dk_seek[DK_NDRIVE];
long dk_time[DK_NDRIVE];
static long dk_time[DK_NDRIVE];
long dk_wds[DK_NDRIVE];
long dk_wpms[DK_NDRIVE];
long dk_xfer[DK_NDRIVE];
@ -151,7 +152,7 @@ int profhz;
int profprocs;
int ticks;
static int psdiv, pscnt; /* prof => stat divider */
int psratio; /* ratio: prof / stat */
static int psratio; /* ratio: prof / stat */
volatile struct timeval time;
volatile struct timeval mono_time;
@ -221,10 +222,10 @@ long time_esterror = MAXPHASE; /* estimated error (us) */
* and to increase the time_maxerror as the time since last update
* increases.
*/
long time_phase = 0; /* phase offset (scaled us) */
static long time_phase = 0; /* phase offset (scaled us) */
long time_freq = 0; /* frequency offset (scaled ppm) */
long time_adj = 0; /* tick adjust (scaled 1 / hz) */
long time_reftime = 0; /* time at last adjustment (s) */
static long time_adj = 0; /* tick adjust (scaled 1 / hz) */
static long time_reftime = 0; /* time at last adjustment (s) */
#ifdef PPS_SYNC
/*

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
* $Id: vfs_subr.c,v 1.47 1995/12/07 12:47:04 davidg Exp $
* $Id: vfs_subr.c,v 1.48 1995/12/11 04:56:09 dyson Exp $
*/
/*
@ -887,7 +887,7 @@ holdrele(vp)
* that are found.
*/
#ifdef DIAGNOSTIC
int busyprt = 0; /* print out busy vnodes */
static int busyprt = 0; /* print out busy vnodes */
SYSCTL_INT(_debug, 1, busyprt, CTLFLAG_RW, &busyprt, 0, "");
#endif

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.42 1995/12/07 12:47:06 davidg Exp $
* $Id: vfs_syscalls.c,v 1.43 1995/12/11 04:56:11 dyson Exp $
*/
#include <sys/param.h>
@ -317,10 +317,6 @@ dounmount(mp, flags, p)
/*
* Sync each mounted filesystem.
*/
#ifdef DIAGNOSTIC
int syncprt = 0;
SYSCTL_INT(_debug, 0, syncprt, CTLFLAG_RW, &syncprt, 0, "");
#endif
#ifndef _SYS_SYSPROTO_H_
struct sync_args {

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_init.c 8.3 (Berkeley) 1/4/94
* $Id: vfs_init.c,v 1.17 1995/12/03 18:00:35 bde Exp $
* $Id: vfs_init.c,v 1.18 1995/12/04 16:48:34 phk Exp $
*/
@ -56,7 +56,7 @@
#include <vm/vm.h>
#include <sys/sysctl.h>
extern void vfs_op_init __P((void));
static void vfs_op_init __P((void));
static void vfsinit __P((void *));
SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vfsinit, NULL)
@ -87,7 +87,7 @@ extern struct vnodeop_desc *vfs_op_descs[];
* extra level of indirection for arrays. It's an interesting
* "feature" of C.
*/
int vfs_opv_numops;
static int vfs_opv_numops;
/*
* A miscellaneous routine.
@ -202,7 +202,7 @@ vfs_opv_init(struct vnodeopv_desc **them)
/*
* Initialize known vnode operations vectors.
*/
void
static void
vfs_op_init()
{
int i;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
* $Id: vfs_subr.c,v 1.47 1995/12/07 12:47:04 davidg Exp $
* $Id: vfs_subr.c,v 1.48 1995/12/11 04:56:09 dyson Exp $
*/
/*
@ -887,7 +887,7 @@ holdrele(vp)
* that are found.
*/
#ifdef DIAGNOSTIC
int busyprt = 0; /* print out busy vnodes */
static int busyprt = 0; /* print out busy vnodes */
SYSCTL_INT(_debug, 1, busyprt, CTLFLAG_RW, &busyprt, 0, "");
#endif

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.42 1995/12/07 12:47:06 davidg Exp $
* $Id: vfs_syscalls.c,v 1.43 1995/12/11 04:56:11 dyson Exp $
*/
#include <sys/param.h>
@ -317,10 +317,6 @@ dounmount(mp, flags, p)
/*
* Sync each mounted filesystem.
*/
#ifdef DIAGNOSTIC
int syncprt = 0;
SYSCTL_INT(_debug, 0, syncprt, CTLFLAG_RW, &syncprt, 0, "");
#endif
#ifndef _SYS_SYSPROTO_H_
struct sync_args {

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94
* $Id: vfs_vnops.c,v 1.20 1995/12/07 12:47:07 davidg Exp $
* $Id: vfs_vnops.c,v 1.21 1995/12/11 04:56:13 dyson Exp $
*/
#include <sys/param.h>
@ -56,6 +56,17 @@
#include <vm/vm_object.h>
#include <vm/vnode_pager.h>
static int vn_closefile __P((struct file *fp, struct proc *p));
static int vn_ioctl __P((struct file *fp, int com, caddr_t data,
struct proc *p));
static int vn_read __P((struct file *fp, struct uio *uio,
struct ucred *cred));
static int vn_select __P((struct file *fp, int which, struct proc *p));
static int vn_vmio_open __P((struct vnode *vp, struct proc *p,
struct ucred *cred));
static int vn_write __P((struct file *fp, struct uio *uio,
struct ucred *cred));
struct fileops vnops =
{ vn_read, vn_write, vn_ioctl, vn_select, vn_closefile };
@ -255,7 +266,7 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, cred, aresid, p)
/*
* File table vnode read routine.
*/
int
static int
vn_read(fp, uio, cred)
struct file *fp;
struct uio *uio;
@ -278,7 +289,7 @@ vn_read(fp, uio, cred)
/*
* File table vnode write routine.
*/
int
static int
vn_write(fp, uio, cred)
struct file *fp;
struct uio *uio;
@ -377,7 +388,7 @@ vn_stat(vp, sb, p)
/*
* File table vnode ioctl routine.
*/
int
static int
vn_ioctl(fp, com, data, p)
struct file *fp;
int com;
@ -430,7 +441,7 @@ vn_ioctl(fp, com, data, p)
/*
* File table vnode select routine.
*/
int
static int
vn_select(fp, which, p)
struct file *fp;
int which;
@ -444,7 +455,7 @@ vn_select(fp, which, p)
/*
* File table vnode close routine.
*/
int
static int
vn_closefile(fp, p)
struct file *fp;
struct proc *p;
@ -454,7 +465,7 @@ vn_closefile(fp, p)
fp->f_cred, p));
}
int
static int
vn_vmio_open(vp, p, cred)
struct vnode *vp;
struct proc *p;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_x25subr.c 8.1 (Berkeley) 6/10/93
* $Id: if_x25subr.c,v 1.7 1995/07/29 11:41:21 bde Exp $
* $Id: if_x25subr.c,v 1.8 1995/10/26 20:30:34 julian Exp $
*/
#include <sys/param.h>
@ -132,7 +132,7 @@ register struct rtentry *rt;
return lx;
}
void
static void
x25_lxfree(lx)
register struct llinfo_x25 *lx;
{
@ -155,7 +155,7 @@ register struct llinfo_x25 *lx;
/*
* Process a x25 packet as datagram;
*/
void
static void
x25_ifinput(lcp, m)
struct pklcd *lcp;
register struct mbuf *m;
@ -226,7 +226,7 @@ register struct mbuf *m;
splx(s);
}
void
static void
x25_connect_callback(lcp, m)
register struct pklcd *lcp;
register struct mbuf *m;
@ -258,7 +258,7 @@ register struct mbuf *m;
#define SA(p) ((struct sockaddr *)(p))
#define RT(p) ((struct rtentry *)(p))
void
static void
x25_dgram_incoming(lcp, m0)
register struct pklcd *lcp;
struct mbuf *m0;
@ -293,7 +293,7 @@ refuse: lcp->lcd_upper = 0;
/*
* X.25 output routine.
*/
int
static int
x25_ifoutput(ifp, m0, dst, rt)
struct ifnet *ifp;
struct mbuf *m0;
@ -408,7 +408,7 @@ if (plen != m->m_pkthdr.len) {
/*
* Simpleminded timer routine.
*/
void
static void
x25_iftimeout(ifp)
struct ifnet *ifp;
{
@ -433,7 +433,7 @@ struct ifnet *ifp;
* or deletions of old ones.
*/
void
static void
x25_rtrequest(cmd, rt, dst)
int cmd;
register struct rtentry *rt;
@ -485,7 +485,7 @@ struct sockaddr *dst;
int x25_dont_rtinvert = 0;
void
static void
x25_rtinvert(cmd, sa, rt)
register struct sockaddr *sa;
register struct rtentry *rt;
@ -539,6 +539,7 @@ union imp_addr {
* The following is totally bogus and here only to preserve
* the IP to X.25 translation.
*/
static int
x25_ddnip_to_ccitt(src, rt)
struct sockaddr_in *src;
register struct rtentry *rt;
@ -591,6 +592,7 @@ register struct rtentry *rt;
* This is a utility routine to be called by x25 devices when a
* call request is honored with the intent of starting datagram forwarding.
*/
static int
x25_dg_rtinit(dst, ia, af)
struct sockaddr_x25 *dst;
register struct x25_ifaddr *ia;
@ -799,6 +801,7 @@ struct mbuf *m0;
}
return 0;
}
static int
x25_rtattach(lcp0, rt)
register struct pklcd *lcp0;
struct rtentry *rt;

View File

@ -8,7 +8,7 @@
* file.
*
* Written by Julian Elischer (julian@dialix.oz.au)
* $Id: scsi_base.c,v 1.32 1995/12/07 12:47:46 davidg Exp $
* $Id: scsi_base.c,v 1.33 1995/12/14 09:54:26 phk Exp $
*/
#define SPLSD splbio
@ -39,7 +39,6 @@ static void show_scsi_xs (struct scsi_xfer *);
#ifdef notyet
static int scsi_sense_qualifiers (struct scsi_xfer *, int *, int *);
static errval scsi_change_def( struct scsi_link *sc_link, u_int32 flags);
#endif
static struct scsi_xfer *next_free_xs;
@ -231,11 +230,11 @@ scsi_test_unit_ready(sc_link, flags)
flags));
}
#ifdef notyet
#ifdef SCSI_2_DEF
/*
* Do a scsi operation, asking a device to run as SCSI-II if it can.
*/
static errval
errval
scsi_change_def(sc_link, flags)
struct scsi_link *sc_link;
u_int32 flags;
@ -256,7 +255,7 @@ scsi_change_def(sc_link, flags)
NULL,
flags));
}
#endif
#endif /* SCSI_2_DEF */
/*
* Do a scsi operation asking a device what it is

View File

@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
* $Id: scsiconf.h,v 1.34 1995/12/14 09:54:30 phk Exp $
* $Id: scsiconf.h,v 1.35 1995/12/14 19:38:38 bde Exp $
*/
#ifndef SCSI_SCSICONF_H
#define SCSI_SCSICONF_H 1
@ -476,6 +476,9 @@ void scsi_configure_finish __P((void));
void ukinit __P((void));
#ifdef SCSI_2_DEF
errval scsi_change_def( struct scsi_link *sc_link, u_int32 flags);
#endif
#endif /* KERNEL */
#define SCSI_EXTERNALLEN (sizeof(struct scsi_link))

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)vnode.h 8.7 (Berkeley) 2/4/94
* $Id: vnode.h,v 1.25 1995/12/11 04:57:23 dyson Exp $
* $Id: vnode.h,v 1.26 1995/12/15 22:49:36 bde Exp $
*/
#ifndef _SYS_VNODE_H_
@ -415,14 +415,10 @@ int vinvalbuf __P((struct vnode *vp, int save, struct ucred *cred,
int vn_bwrite __P((struct vop_bwrite_args *ap));
int vn_close __P((struct vnode *vp,
int flags, struct ucred *cred, struct proc *p));
int vn_closefile __P((struct file *fp, struct proc *p));
int vn_ioctl __P((struct file *fp, int com, caddr_t data, struct proc *p));
int vn_open __P((struct nameidata *ndp, int fmode, int cmode));
int vn_rdwr __P((enum uio_rw rw, struct vnode *vp, caddr_t base,
int len, off_t offset, enum uio_seg segflg, int ioflg,
struct ucred *cred, int *aresid, struct proc *p));
int vn_read __P((struct file *fp, struct uio *uio, struct ucred *cred));
int vn_select __P((struct file *fp, int which, struct proc *p));
int vn_stat __P((struct vnode *vp, struct stat *sb, struct proc *p));
void vn_vmio_close __P((struct vnode *vp));
int vn_vmio_open __P((struct vnode *vp, struct proc *p,