summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2003-04-30 12:57:40 +0000
committermarkm <markm@FreeBSD.org>2003-04-30 12:57:40 +0000
commit6cc289554b8533c3a4ccee449df82dd25964011a (patch)
tree78f25ba6828418e0a4c21039c67b86f39bb61181
parentbc54a1bc8ba917055c728fd55e152d1aede2174c (diff)
downloadFreeBSD-src-6cc289554b8533c3a4ccee449df82dd25964011a.zip
FreeBSD-src-6cc289554b8533c3a4ccee449df82dd25964011a.tar.gz
Fix some easy, global, lint warnings. In most cases, this means
making some local variables static. In a couple of cases, this means removing an unused variable.
-rw-r--r--sys/amd64/amd64/autoconf.c2
-rw-r--r--sys/dev/atkbdc/atkbd.c2
-rw-r--r--sys/dev/atkbdc/atkbd_atkbdc.c2
-rw-r--r--sys/dev/atkbdc/atkbd_isa.c2
-rw-r--r--sys/dev/atkbdc/atkbdc_isa.c2
-rw-r--r--sys/dev/atkbdc/atkbdc_subr.c2
-rw-r--r--sys/dev/atkbdc/psm.c2
-rw-r--r--sys/dev/kbd/atkbd.c2
-rw-r--r--sys/dev/ppc/ppc.c2
-rw-r--r--sys/dev/sio/sio.c2
-rw-r--r--sys/geom/geom_kern.c2
-rw-r--r--sys/i386/i386/autoconf.c2
-rw-r--r--sys/isa/atkbd_isa.c2
-rw-r--r--sys/isa/atkbdc_isa.c2
-rw-r--r--sys/isa/ppc.c2
-rw-r--r--sys/isa/psm.c2
-rw-r--r--sys/kern/kern_descrip.c2
-rw-r--r--sys/kern/kern_fork.c2
-rw-r--r--sys/kern/kern_mib.c2
-rw-r--r--sys/kern/sched_4bsd.c2
-rw-r--r--sys/kern/subr_bus.c4
-rw-r--r--sys/kern/subr_mbuf.c2
-rw-r--r--sys/kern/uipc_sockbuf.c2
-rw-r--r--sys/kern/uipc_socket2.c2
-rw-r--r--sys/net/if.c2
-rw-r--r--sys/net/if_ethersubr.c2
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c2
-rw-r--r--sys/ufs/ufs/ufs_lookup.c4
28 files changed, 28 insertions, 32 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c
index 4f683e4..f97fbc0 100644
--- a/sys/amd64/amd64/autoconf.c
+++ b/sys/amd64/amd64/autoconf.c
@@ -97,8 +97,6 @@ SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL);
/* SI_ORDER_MIDDLE is hookable */
SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL);
-device_t nexus_dev;
-
/*
* Determine i/o configuration for a machine.
*/
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c
index 46cd642..edf6489 100644
--- a/sys/dev/atkbdc/atkbd.c
+++ b/sys/dev/atkbdc/atkbd.c
@@ -205,7 +205,7 @@ static kbd_get_state_t atkbd_get_state;
static kbd_set_state_t atkbd_set_state;
static kbd_poll_mode_t atkbd_poll;
-keyboard_switch_t atkbdsw = {
+static keyboard_switch_t atkbdsw = {
atkbd_probe,
atkbd_init,
atkbd_term,
diff --git a/sys/dev/atkbdc/atkbd_atkbdc.c b/sys/dev/atkbdc/atkbd_atkbdc.c
index 0e505dad..8b9053d 100644
--- a/sys/dev/atkbdc/atkbd_atkbdc.c
+++ b/sys/dev/atkbdc/atkbd_atkbdc.c
@@ -50,7 +50,7 @@ typedef struct {
void *ih;
} atkbd_softc_t;
-devclass_t atkbd_devclass;
+static devclass_t atkbd_devclass;
static void atkbdidentify(driver_t *driver, device_t dev);
static int atkbdprobe(device_t dev);
diff --git a/sys/dev/atkbdc/atkbd_isa.c b/sys/dev/atkbdc/atkbd_isa.c
index 0e505dad..8b9053d 100644
--- a/sys/dev/atkbdc/atkbd_isa.c
+++ b/sys/dev/atkbdc/atkbd_isa.c
@@ -50,7 +50,7 @@ typedef struct {
void *ih;
} atkbd_softc_t;
-devclass_t atkbd_devclass;
+static devclass_t atkbd_devclass;
static void atkbdidentify(driver_t *driver, device_t dev);
static int atkbdprobe(device_t dev);
diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c
index 5619fff..c304153 100644
--- a/sys/dev/atkbdc/atkbdc_isa.c
+++ b/sys/dev/atkbdc/atkbdc_isa.c
@@ -56,7 +56,7 @@ typedef struct atkbdc_device {
} atkbdc_device_t;
/* kbdc */
-devclass_t atkbdc_devclass;
+static devclass_t atkbdc_devclass;
static int atkbdc_probe(device_t dev);
static int atkbdc_attach(device_t dev);
diff --git a/sys/dev/atkbdc/atkbdc_subr.c b/sys/dev/atkbdc/atkbdc_subr.c
index 5619fff..c304153 100644
--- a/sys/dev/atkbdc/atkbdc_subr.c
+++ b/sys/dev/atkbdc/atkbdc_subr.c
@@ -56,7 +56,7 @@ typedef struct atkbdc_device {
} atkbdc_device_t;
/* kbdc */
-devclass_t atkbdc_devclass;
+static devclass_t atkbdc_devclass;
static int atkbdc_probe(device_t dev);
static int atkbdc_attach(device_t dev);
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index afb66ba..c312dbf 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -164,7 +164,7 @@ struct psm_softc { /* Driver status information */
dev_t dev;
dev_t bdev;
};
-devclass_t psm_devclass;
+static devclass_t psm_devclass;
#define PSM_SOFTC(unit) ((struct psm_softc*)devclass_get_softc(psm_devclass, unit))
/* driver state flags (state) */
diff --git a/sys/dev/kbd/atkbd.c b/sys/dev/kbd/atkbd.c
index 46cd642..edf6489 100644
--- a/sys/dev/kbd/atkbd.c
+++ b/sys/dev/kbd/atkbd.c
@@ -205,7 +205,7 @@ static kbd_get_state_t atkbd_get_state;
static kbd_set_state_t atkbd_set_state;
static kbd_poll_mode_t atkbd_poll;
-keyboard_switch_t atkbdsw = {
+static keyboard_switch_t atkbdsw = {
atkbd_probe,
atkbd_init,
atkbd_term,
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c
index 690d0cc..a32eb44 100644
--- a/sys/dev/ppc/ppc.c
+++ b/sys/dev/ppc/ppc.c
@@ -60,7 +60,7 @@
#define DEVTOSOFTC(dev) ((struct ppc_data *)device_get_softc(dev))
-devclass_t ppc_devclass;
+static devclass_t ppc_devclass;
static int ppc_probe(device_t dev);
static int ppc_attach(device_t dev);
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index c448716..4d294df 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -327,7 +327,7 @@ static struct cdevsw sio_cdevsw = {
.d_kqfilter = ttykqfilter,
};
-int comconsole = -1;
+static int comconsole = -1;
static volatile speed_t comdefaultrate = CONSPEED;
static u_long comdefaultrclk = DEFAULT_RCLK;
SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, "");
diff --git a/sys/geom/geom_kern.c b/sys/geom/geom_kern.c
index aa44b9f..fd811cc 100644
--- a/sys/geom/geom_kern.c
+++ b/sys/geom/geom_kern.c
@@ -135,7 +135,7 @@ g_event_procbody(void)
}
}
-struct kproc_desc g_event_kp = {
+static struct kproc_desc g_event_kp = {
"g_event",
g_event_procbody,
&g_event_proc,
diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c
index 4f683e4..f97fbc0 100644
--- a/sys/i386/i386/autoconf.c
+++ b/sys/i386/i386/autoconf.c
@@ -97,8 +97,6 @@ SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL);
/* SI_ORDER_MIDDLE is hookable */
SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL);
-device_t nexus_dev;
-
/*
* Determine i/o configuration for a machine.
*/
diff --git a/sys/isa/atkbd_isa.c b/sys/isa/atkbd_isa.c
index 0e505dad..8b9053d 100644
--- a/sys/isa/atkbd_isa.c
+++ b/sys/isa/atkbd_isa.c
@@ -50,7 +50,7 @@ typedef struct {
void *ih;
} atkbd_softc_t;
-devclass_t atkbd_devclass;
+static devclass_t atkbd_devclass;
static void atkbdidentify(driver_t *driver, device_t dev);
static int atkbdprobe(device_t dev);
diff --git a/sys/isa/atkbdc_isa.c b/sys/isa/atkbdc_isa.c
index 5619fff..c304153 100644
--- a/sys/isa/atkbdc_isa.c
+++ b/sys/isa/atkbdc_isa.c
@@ -56,7 +56,7 @@ typedef struct atkbdc_device {
} atkbdc_device_t;
/* kbdc */
-devclass_t atkbdc_devclass;
+static devclass_t atkbdc_devclass;
static int atkbdc_probe(device_t dev);
static int atkbdc_attach(device_t dev);
diff --git a/sys/isa/ppc.c b/sys/isa/ppc.c
index 690d0cc..a32eb44 100644
--- a/sys/isa/ppc.c
+++ b/sys/isa/ppc.c
@@ -60,7 +60,7 @@
#define DEVTOSOFTC(dev) ((struct ppc_data *)device_get_softc(dev))
-devclass_t ppc_devclass;
+static devclass_t ppc_devclass;
static int ppc_probe(device_t dev);
static int ppc_attach(device_t dev);
diff --git a/sys/isa/psm.c b/sys/isa/psm.c
index afb66ba..c312dbf 100644
--- a/sys/isa/psm.c
+++ b/sys/isa/psm.c
@@ -164,7 +164,7 @@ struct psm_softc { /* Driver status information */
dev_t dev;
dev_t bdev;
};
-devclass_t psm_devclass;
+static devclass_t psm_devclass;
#define PSM_SOFTC(unit) ((struct psm_softc*)devclass_get_softc(psm_devclass, unit))
/* driver state flags (state) */
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 6975d0e..2e162cd 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -75,7 +75,7 @@
static MALLOC_DEFINE(M_FILEDESC, "file desc", "Open file descriptor table");
static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures");
-uma_zone_t file_zone;
+static uma_zone_t file_zone;
static d_open_t fdopen;
#define NUMFDESC 64
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 3dc5f2b..6cef9d3 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -83,7 +83,7 @@ struct fork_args {
};
#endif
-int forksleep; /* Place for fork1() to sleep on. */
+static int forksleep; /* Place for fork1() to sleep on. */
/*
* MPSAFE
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c
index f45aa9b..4a6d38c 100644
--- a/sys/kern/kern_mib.c
+++ b/sys/kern/kern_mib.c
@@ -231,7 +231,7 @@ SYSCTL_INT(_regression, OID_AUTO, securelevel_nonmonotonic, CTLFLAG_RW,
#endif
int securelevel = -1;
-struct mtx securelevel_mtx;
+static struct mtx securelevel_mtx;
MTX_SYSINIT(securelevel_lock, &securelevel_mtx, "securelevel mutex lock",
MTX_DEF);
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 07a7071..9ba03bf 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -65,7 +65,7 @@ struct ke_sched {
int ske_cpticks; /* (j) Ticks of cpu time. */
};
-struct ke_sched ke_sched;
+static struct ke_sched ke_sched;
struct ke_sched *kse0_sched = &ke_sched;
struct kg_sched *ksegrp0_sched = NULL;
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 8a68b9d..740066e 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -234,7 +234,7 @@ struct dev_event_info
TAILQ_HEAD(devq, dev_event_info);
-struct dev_softc
+static struct dev_softc
{
int inuse;
int nonblock;
@@ -245,7 +245,7 @@ struct dev_softc
struct proc *async_proc;
} devsoftc;
-dev_t devctl_dev;
+static dev_t devctl_dev;
static void
devinit(void)
diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c
index ff226e7..5d593e6 100644
--- a/sys/kern/subr_mbuf.c
+++ b/sys/kern/subr_mbuf.c
@@ -228,7 +228,7 @@ struct mb_lstmngr {
};
static struct mb_lstmngr mb_list_mbuf, mb_list_clust;
static struct mtx mbuf_gen, mbuf_pcpu[NCPU];
-u_int *cl_refcntmap;
+static u_int *cl_refcntmap;
/*
* Local macros for internal allocator structure manipulations.
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index cc23dc3..e2a125f 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -67,7 +67,7 @@ void (*aio_swake)(struct socket *, struct sockbuf *);
*/
u_long sb_max = SB_MAX;
-u_long sb_max_adj =
+static u_long sb_max_adj =
SB_MAX * MCLBYTES / (MSIZE + MCLBYTES); /* adjusted sb_max */
static u_long sb_efficiency = 8; /* parameter for sbreserve() */
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index cc23dc3..e2a125f 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -67,7 +67,7 @@ void (*aio_swake)(struct socket *, struct sockbuf *);
*/
u_long sb_max = SB_MAX;
-u_long sb_max_adj =
+static u_long sb_max_adj =
SB_MAX * MCLBYTES / (MSIZE + MCLBYTES); /* adjusted sb_max */
static u_long sb_efficiency = 8; /* parameter for sbreserve() */
diff --git a/sys/net/if.c b/sys/net/if.c
index 93620c7..41b7286 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -103,7 +103,7 @@ struct ifindex_entry *ifindex_table = NULL;
int ifqmaxlen = IFQ_MAXLEN;
struct ifnethead ifnet; /* depend on static init XXX */
struct mtx ifnet_lock;
-int if_cloners_count;
+static int if_cloners_count;
LIST_HEAD(, if_clone) if_cloners = LIST_HEAD_INITIALIZER(if_cloners);
static int if_indexlim = 8;
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 541ef43..d7ebcc7 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -102,7 +102,7 @@ int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp);
void (*ng_ether_attach_p)(struct ifnet *ifp);
void (*ng_ether_detach_p)(struct ifnet *ifp);
-void (*vlan_input_p)(struct ifnet *, struct mbuf *);
+static void (*vlan_input_p)(struct ifnet *, struct mbuf *);
/* bridge support */
int do_bridge;
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index afae8e8..0be25d5 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -104,7 +104,7 @@ int dopersistence = 0;
#ifdef DEBUG
#include <sys/sysctl.h>
SYSCTL_INT(_debug, OID_AUTO, dopersistence, CTLFLAG_RW, &dopersistence, 0, "");
-int snapdebug = 0;
+static int snapdebug = 0;
SYSCTL_INT(_debug, OID_AUTO, snapdebug, CTLFLAG_RW, &snapdebug, 0, "");
int collectsnapstats = 0;
SYSCTL_INT(_debug, OID_AUTO, collectsnapstats, CTLFLAG_RW, &collectsnapstats,
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index f5c9a85..717c840 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -68,9 +68,9 @@
#include <ufs/ufs/ufs_extern.h>
#ifdef DIAGNOSTIC
-int dirchk = 1;
+static int dirchk = 1;
#else
-int dirchk = 0;
+static int dirchk = 0;
#endif
SYSCTL_INT(_debug, OID_AUTO, dircheck, CTLFLAG_RW, &dirchk, 0, "");
OpenPOWER on IntegriCloud