Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/next68k/dev Make local functions static.
details: https://anonhg.NetBSD.org/src/rev/b6520bc22929
branches: trunk
changeset: 373347:b6520bc22929
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Feb 03 23:17:49 2023 +0000
description:
Make local functions static.
diffstat:
sys/arch/next68k/dev/esp.c | 69 +++++++++++++++++++++++----------------------
1 files changed, 35 insertions(+), 34 deletions(-)
diffs (205 lines):
diff -r 175ef2737cdc -r b6520bc22929 sys/arch/next68k/dev/esp.c
--- a/sys/arch/next68k/dev/esp.c Fri Feb 03 23:16:07 2023 +0000
+++ b/sys/arch/next68k/dev/esp.c Fri Feb 03 23:17:49 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esp.c,v 1.66 2023/02/03 23:16:07 tsutsui Exp $ */
+/* $NetBSD: esp.c,v 1.67 2023/02/03 23:17:49 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.66 2023/02/03 23:16:07 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.67 2023/02/03 23:17:49 tsutsui Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -126,13 +126,13 @@
#define PRINTF(x) printf x;
-int espmatch_intio(device_t, cfdata_t, void *);
-void espattach_intio(device_t, device_t, void *);
+static int espmatch_intio(device_t, cfdata_t, void *);
+static void espattach_intio(device_t, device_t, void *);
/* DMA callbacks */
-bus_dmamap_t esp_dmacb_continue(void *);
-void esp_dmacb_completed(bus_dmamap_t, void *);
-void esp_dmacb_shutdown(void *);
+static bus_dmamap_t esp_dmacb_continue(void *);
+static void esp_dmacb_completed(bus_dmamap_t, void *);
+static void esp_dmacb_shutdown(void *);
static void findchannel_defer(device_t);
@@ -155,18 +155,20 @@
/*
* Functions and the switch for the MI code.
*/
-uint8_t esp_read_reg(struct ncr53c9x_softc *, int);
-void esp_write_reg(struct ncr53c9x_softc *, int, uint8_t);
-int esp_dma_isintr(struct ncr53c9x_softc *);
-void esp_dma_reset(struct ncr53c9x_softc *);
-int esp_dma_intr(struct ncr53c9x_softc *);
-int esp_dma_setup(struct ncr53c9x_softc *, uint8_t **, size_t *, int,
- size_t *);
-void esp_dma_go(struct ncr53c9x_softc *);
-void esp_dma_stop(struct ncr53c9x_softc *);
-int esp_dma_isactive(struct ncr53c9x_softc *);
+static uint8_t esp_read_reg(struct ncr53c9x_softc *, int);
+static void esp_write_reg(struct ncr53c9x_softc *, int, uint8_t);
+static int esp_dma_isintr(struct ncr53c9x_softc *);
+static void esp_dma_reset(struct ncr53c9x_softc *);
+static int esp_dma_intr(struct ncr53c9x_softc *);
+static int esp_dma_setup(struct ncr53c9x_softc *, uint8_t **, size_t *, int,
+ size_t *);
+static void esp_dma_go(struct ncr53c9x_softc *);
+static void esp_dma_stop(struct ncr53c9x_softc *);
+static int esp_dma_isactive(struct ncr53c9x_softc *);
-struct ncr53c9x_glue esp_glue = {
+static int doze(volatile int);
+
+static struct ncr53c9x_glue esp_glue = {
.gl_read_reg = esp_read_reg,
.gl_write_reg = esp_write_reg,
.gl_dma_isintr = esp_dma_isintr,
@@ -215,7 +217,7 @@
}
#endif
-int
+static int
espmatch_intio(device_t parent, cfdata_t cf, void *aux)
{
struct intio_attach_args *ia = aux;
@@ -286,7 +288,7 @@
device_xname(esc->sc_dma->sc_dev));
}
-void
+static void
espattach_intio(device_t parent, device_t self, void *aux)
{
struct esp_softc *esc = device_private(self);
@@ -417,7 +419,7 @@
* Glue functions.
*/
-uint8_t
+static uint8_t
esp_read_reg(struct ncr53c9x_softc *sc, int reg)
{
struct esp_softc *esc = (struct esp_softc *)sc;
@@ -425,7 +427,7 @@
return bus_space_read_1(esc->sc_bst, esc->sc_bsh, reg);
}
-void
+static void
esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t val)
{
struct esp_softc *esc = (struct esp_softc *)sc;
@@ -436,8 +438,7 @@
volatile uint32_t save1;
#define xADDR 0x0211a000
-int doze(volatile int);
-int
+static int
doze(volatile int c)
{
#if 0
@@ -464,7 +465,7 @@
return 0;
}
-int
+static int
esp_dma_isintr(struct ncr53c9x_softc *sc)
{
struct esp_softc *esc = (struct esp_softc *)sc;
@@ -480,7 +481,7 @@
}
}
-int
+static int
esp_dma_intr(struct ncr53c9x_softc *sc)
{
struct esp_softc *esc = (struct esp_softc *)sc;
@@ -746,7 +747,7 @@
return r;
}
-void
+static void
esp_dma_reset(struct ncr53c9x_softc *sc)
{
struct esp_softc *esc = (struct esp_softc *)sc;
@@ -808,7 +809,7 @@
* (len may be > maxxfer)
*/
-int
+static int
esp_dma_setup(struct ncr53c9x_softc *sc, uint8_t **addr, size_t *len,
int datain, size_t *dmasize)
{
@@ -1277,7 +1278,7 @@
}
#endif
-void
+static void
esp_dma_go(struct ncr53c9x_softc *sc)
{
struct esp_softc *esc = (struct esp_softc *)sc;
@@ -1418,7 +1419,7 @@
#endif
}
-void
+static void
esp_dma_stop(struct ncr53c9x_softc *sc)
{
struct esp_softc *esc = (struct esp_softc *)sc;
@@ -1432,7 +1433,7 @@
#endif
}
-int
+static int
esp_dma_isactive(struct ncr53c9x_softc *sc)
{
struct esp_softc *esc = (struct esp_softc *)sc;
@@ -1702,7 +1703,7 @@
}
/* Internal DMA callback routines */
-bus_dmamap_t
+static bus_dmamap_t
esp_dmacb_continue(void *arg)
{
struct ncr53c9x_softc *sc = arg;
@@ -1752,7 +1753,7 @@
}
-void
+static void
esp_dmacb_completed(bus_dmamap_t map, void *arg)
{
struct ncr53c9x_softc *sc = (struct ncr53c9x_softc *)arg;
@@ -1862,7 +1863,7 @@
}
-void
+static void
esp_dmacb_shutdown(void *arg)
{
struct ncr53c9x_softc *sc = (struct ncr53c9x_softc *)arg;
Home |
Main Index |
Thread Index |
Old Index