Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/dev Make local functions and variable static.
details: https://anonhg.NetBSD.org/src/rev/af7ca583dfd8
branches: trunk
changeset: 366427:af7ca583dfd8
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu May 26 14:27:43 2022 +0000
description:
Make local functions and variable static.
diffstat:
sys/arch/x68k/dev/fd.c | 118 ++++++++++++++++++++++++------------------------
1 files changed, 60 insertions(+), 58 deletions(-)
diffs (truncated from 372 to 300 lines):
diff -r a16af2e6e7cf -r af7ca583dfd8 sys/arch/x68k/dev/fd.c
--- a/sys/arch/x68k/dev/fd.c Thu May 26 14:24:42 2022 +0000
+++ b/sys/arch/x68k/dev/fd.c Thu May 26 14:27:43 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.126 2022/05/23 16:58:37 tsutsui Exp $ */
+/* $NetBSD: fd.c,v 1.127 2022/05/26 14:27:43 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.126 2022/05/23 16:58:37 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.127 2022/05/26 14:27:43 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_m68k_arch.h"
@@ -160,13 +160,13 @@
uint8_t sc_status[7]; /* copy of registers */
};
-int fdcintr(void *);
-void fdcreset(struct fdc_softc *);
+static int fdcintr(void *);
+static void fdcreset(struct fdc_softc *);
/* controller driver configuration */
-int fdcprobe(device_t, cfdata_t, void *);
-void fdcattach(device_t, device_t, void *);
-int fdprint(void *, const char *);
+static int fdcprobe(device_t, cfdata_t, void *);
+static void fdcattach(device_t, device_t, void *);
+static int fdprint(void *, const char *);
CFATTACH_DECL_NEW(fdc, sizeof(struct fdc_softc),
fdcprobe, fdcattach, NULL, NULL);
@@ -194,7 +194,7 @@
};
/* The order of entries in the following table is important -- BEWARE! */
-struct fd_type fd_types[] = {
+static struct fd_type fd_types[] = {
{ 8,2,16,3,0xff,0xdf,0x35,0x74,77,1232,1,FDC_500KBPS, 0xf6, 1,
"1.2MB/[1024bytes/sector]" }, /* 1.2 MB japanese format */
{ 18,2,36,2,0xff,0xcf,0x1b,0x6c,80,2880,1,FDC_500KBPS, 0xf6, 1,
@@ -257,18 +257,18 @@
};
/* floppy driver configuration */
-int fdprobe(device_t, cfdata_t, void *);
-void fdattach(device_t, device_t, void *);
+static int fdprobe(device_t, cfdata_t, void *);
+static void fdattach(device_t, device_t, void *);
CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc),
fdprobe, fdattach, NULL, NULL);
-dev_type_open(fdopen);
-dev_type_close(fdclose);
-dev_type_read(fdread);
-dev_type_write(fdwrite);
-dev_type_ioctl(fdioctl);
-dev_type_strategy(fdstrategy);
+static dev_type_open(fdopen);
+static dev_type_close(fdclose);
+static dev_type_read(fdread);
+static dev_type_write(fdwrite);
+static dev_type_ioctl(fdioctl);
+static dev_type_strategy(fdstrategy);
const struct bdevsw fd_bdevsw = {
.d_open = fdopen,
@@ -296,32 +296,34 @@
.d_flag = D_DISK
};
-void fdstart(struct fd_softc *);
+static void fdstart(struct fd_softc *);
struct dkdriver fddkdriver = {
.d_strategy = fdstrategy
};
-void fd_set_motor(struct fdc_softc *, int);
-void fd_motor_off(void *);
+static void fd_set_motor(struct fdc_softc *, int);
+static void fd_motor_off(void *);
#if 0
-void fd_motor_on(void *);
+static void fd_motor_on(void *);
#endif
-int fdcresult(struct fdc_softc *);
-int out_fdc(bus_space_tag_t, bus_space_handle_t, uint8_t);
-void fdcstart(struct fdc_softc *);
-void fdcstatus(device_t, int, const char *);
-void fdctimeout(void *);
-void fdcpseudointr(void *);
-void fdcretry(struct fdc_softc *);
-void fdfinish(struct fd_softc *, struct buf *);
+static int fdcresult(struct fdc_softc *);
+static int out_fdc(bus_space_tag_t, bus_space_handle_t, uint8_t);
+static void fdcstart(struct fdc_softc *);
+static void fdcstatus(device_t, int, const char *);
+static void fdctimeout(void *);
+#if 0
+static void fdcpseudointr(void *);
+#endif
+static void fdcretry(struct fdc_softc *);
+static void fdfinish(struct fd_softc *, struct buf *);
static struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
-int fdformat(dev_t, struct ne7_fd_formb *, struct lwp *);
+static int fdformat(dev_t, struct ne7_fd_formb *, struct lwp *);
static int fdcpoll(struct fdc_softc *);
static int fdgetdisklabel(struct fd_softc *, dev_t);
static void fd_do_eject(struct fdc_softc *, int);
-void fd_mountroot_hook(device_t);
+static void fd_mountroot_hook(device_t);
/* DMA transfer routines */
inline static void fdc_dmastart(struct fdc_softc *, int, void *, vsize_t);
@@ -400,7 +402,7 @@
}
/* ARGSUSED */
-int
+static int
fdcprobe(device_t parent, cfdata_t cf, void *aux)
{
struct intio_attach_args *ia = aux;
@@ -443,7 +445,7 @@
* Return QUIET (config_find ignores this if the device was configured) to
* avoid printing `fdN not configured' messages.
*/
-int
+static int
fdprint(void *aux, const char *fdc)
{
struct fdc_attach_args *fa = aux;
@@ -453,7 +455,7 @@
return QUIET;
}
-void
+static void
fdcattach(device_t parent, device_t self, void *aux)
{
struct fdc_softc *fdc = device_private(self);
@@ -520,7 +522,7 @@
intio_enable_intr(SICILIAN_INTR_FDC);
}
-void
+static void
fdcreset(struct fdc_softc *fdc)
{
@@ -543,7 +545,7 @@
return i;
}
-int
+static int
fdprobe(device_t parent, cfdata_t cf, void *aux)
{
struct fdc_softc *fdc = device_private(parent);
@@ -620,7 +622,7 @@
/*
* Controller is working, and drive responded. Attach it.
*/
-void
+static void
fdattach(device_t parent, device_t self, void *aux)
{
struct fdc_softc *fdc = device_private(parent);
@@ -680,7 +682,7 @@
return &fd_types[type];
}
-void
+static void
fdstrategy(struct buf *bp)
{
struct fd_softc *fd;
@@ -761,7 +763,7 @@
biodone(bp);
}
-void
+static void
fdstart(struct fd_softc *fd)
{
struct fdc_softc *fdc = device_private(device_parent(fd->sc_dev));
@@ -776,7 +778,7 @@
fdcstart(fdc);
}
-void
+static void
fdfinish(struct fd_softc *fd, struct buf *bp)
{
struct fdc_softc *fdc = device_private(device_parent(fd->sc_dev));
@@ -807,21 +809,21 @@
fdc->sc_state = DEVIDLE;
}
-int
+static int
fdread(dev_t dev, struct uio *uio, int flags)
{
return physio(fdstrategy, NULL, dev, B_READ, minphys, uio);
}
-int
+static int
fdwrite(dev_t dev, struct uio *uio, int flags)
{
return physio(fdstrategy, NULL, dev, B_WRITE, minphys, uio);
}
-void
+static void
fd_set_motor(struct fdc_softc *fdc, int reset)
{
struct fd_softc *fd;
@@ -836,7 +838,7 @@
}
}
-void
+static void
fd_motor_off(void *arg)
{
struct fd_softc *fd = arg;
@@ -856,7 +858,7 @@
}
#if 0 /* on x68k motor on triggers interrupts by state change of ready line. */
-void
+static void
fd_motor_on(void *arg)
{
struct fd_softc *fd = arg;
@@ -874,7 +876,7 @@
}
#endif
-int
+static int
fdcresult(struct fdc_softc *fdc)
{
bus_space_tag_t iot = fdc->sc_iot;
@@ -903,7 +905,7 @@
return -1;
}
-int
+static int
out_fdc(bus_space_tag_t iot, bus_space_handle_t ioh, uint8_t x)
{
int i = 100000;
@@ -918,7 +920,7 @@
return 0;
}
-int
+static int
fdopen(dev_t dev, int flags, int mode, struct lwp *l)
{
int unit;
@@ -963,7 +965,7 @@
return 0;
}
-int
+static int
fdclose(dev_t dev, int flags, int mode, struct lwp *l)
{
int unit = FDUNIT(dev);
@@ -992,7 +994,7 @@
return 0;
}
-void
+static void
fdcstart(struct fdc_softc *fdc)
{
@@ -1041,7 +1043,7 @@
}
}
-void
+static void
fdcstatus(device_t dv, int n, const char *s)
{
struct fdc_softc *fdc = device_private(device_parent(dv));
Home |
Main Index |
Thread Index |
Old Index