Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/pmax The clean-up continues:



details:   https://anonhg.NetBSD.org/src/rev/f53b1fbe940b
branches:  trunk
changeset: 480310:f53b1fbe940b
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Jan 09 03:55:28 2000 +0000

description:
The clean-up continues:
 - Make local-only function and variables static.
 - Move function prototypes and extern variable declarations to
   header files.
 - Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.

diffstat:

 sys/arch/pmax/dev/bt478.c         |   6 +--
 sys/arch/pmax/dev/bt478var.h      |   3 +-
 sys/arch/pmax/dev/cfb.c           |  21 ++++-----
 sys/arch/pmax/dev/dc.c            |  80 +++++++++++++++++++-------------------
 sys/arch/pmax/dev/dc_cons.h       |  17 --------
 sys/arch/pmax/dev/dc_ds.c         |   4 +-
 sys/arch/pmax/dev/dc_ds_cons.h    |  14 ------
 sys/arch/pmax/dev/dcvar.h         |  18 ++++---
 sys/arch/pmax/dev/dtop.c          |  58 ++++++++++++++-------------
 sys/arch/pmax/dev/dtopvar.h       |  14 ++----
 sys/arch/pmax/dev/fb.c            |   9 +---
 sys/arch/pmax/dev/findcons.c      |  61 ++++++++++++-----------------
 sys/arch/pmax/dev/mfb.c           |  49 +++++++++++------------
 sys/arch/pmax/dev/pm.c            |  29 +++++--------
 sys/arch/pmax/dev/pm_ds.c         |  48 ++++++++++------------
 sys/arch/pmax/dev/pmvar.h         |   5 +-
 sys/arch/pmax/dev/px.c            |  40 ++++++++----------
 sys/arch/pmax/dev/qvss_compat.c   |  50 +++++++++---------------
 sys/arch/pmax/dev/rcons.c         |  29 ++-----------
 sys/arch/pmax/dev/rconsvar.h      |   8 ++-
 sys/arch/pmax/dev/rz.c            |  64 ++++++++++++++-----------------
 sys/arch/pmax/dev/sfb.c           |  20 ++++-----
 sys/arch/pmax/dev/sii.c           |  22 ++++------
 sys/arch/pmax/dev/sii_ds.c        |  47 +++++++++++-----------
 sys/arch/pmax/dev/tz.c            |   4 +-
 sys/arch/pmax/dev/xcfb.c          |  14 +++---
 sys/arch/pmax/ibus/ibus.c         |   8 +-
 sys/arch/pmax/ibus/mcclock_ibus.c |  14 +++--
 sys/arch/pmax/include/conf.h      |   3 +-
 sys/arch/pmax/include/fbvar.h     |   6 +-
 sys/arch/pmax/include/locore.h    |   8 +++-
 sys/arch/pmax/pmax/autoconf.c     |  12 ++---
 sys/arch/pmax/pmax/bus_dma.c      |  12 ++--
 sys/arch/pmax/pmax/clock.c        |   6 +-
 sys/arch/pmax/pmax/conf-glue.c    |  20 +++++----
 sys/arch/pmax/pmax/cpu.c          |   4 +-
 sys/arch/pmax/pmax/dec_3100.c     |  27 ++++++------
 sys/arch/pmax/pmax/dec_3max.c     |  28 ++++++------
 sys/arch/pmax/pmax/dec_3maxplus.c |  38 ++++++++---------
 sys/arch/pmax/pmax/dec_3min.c     |  44 ++++++++++-----------
 sys/arch/pmax/pmax/dec_5100.c     |  39 ++++++++----------
 sys/arch/pmax/pmax/dec_maxine.c   |  41 +++++++++----------
 sys/arch/pmax/pmax/disksubr.c     |  11 +---
 sys/arch/pmax/pmax/machdep.c      |  70 +++++++++++++--------------------
 sys/arch/pmax/pmax/machdep.h      |  11 +---
 sys/arch/pmax/pmax/md_root.c      |   6 +-
 sys/arch/pmax/pmax/memc_3max.c    |   5 +-
 sys/arch/pmax/pmax/sysconf.c      |   6 +-
 sys/arch/pmax/tc/mcclock_ioasic.c |  14 +++--
 sys/arch/pmax/tc/scc.c            |  60 +++++++++++++----------------
 sys/arch/pmax/tc/sccvar.h         |  20 +++++----
 sys/arch/pmax/tc/tcbus.c          |  38 +++++++++---------
 52 files changed, 570 insertions(+), 715 deletions(-)

diffs (truncated from 3821 to 300 lines):

diff -r 4c39b1059f2b -r f53b1fbe940b sys/arch/pmax/dev/bt478.c
--- a/sys/arch/pmax/dev/bt478.c Sun Jan 09 03:44:33 2000 +0000
+++ b/sys/arch/pmax/dev/bt478.c Sun Jan 09 03:55:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bt478.c,v 1.13 2000/01/08 01:02:35 simonb Exp $        */
+/*     $NetBSD: bt478.c,v 1.14 2000/01/09 03:55:28 simonb Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -78,10 +78,6 @@
  */
 
 
-/* XXX qvss ioctl interface uses this */
-void   bt478CursorColor __P((struct fbinfo *fi, unsigned int color[]));
-
-
 static u_char  bg_RGB[3];      /* background color for the cursor */
 static u_char  fg_RGB[3];      /* foreground color for the cursor */
 
diff -r 4c39b1059f2b -r f53b1fbe940b sys/arch/pmax/dev/bt478var.h
--- a/sys/arch/pmax/dev/bt478var.h      Sun Jan 09 03:44:33 2000 +0000
+++ b/sys/arch/pmax/dev/bt478var.h      Sun Jan 09 03:55:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bt478var.h,v 1.5 2000/01/08 01:02:35 simonb Exp $      */
+/*     $NetBSD: bt478var.h,v 1.6 2000/01/09 03:55:29 simonb Exp $      */
 
 /*
  * Copyright 1996 The Board of Trustees of The Leland Stanford
@@ -26,3 +26,4 @@
            int index, int count));
 int    bt478GetColorMap __P((struct fbinfo *fi, u_char *bits,
            int index, int count));
+void   bt478CursorColor __P((struct fbinfo *fi, unsigned int color[]));
diff -r 4c39b1059f2b -r f53b1fbe940b sys/arch/pmax/dev/cfb.c
--- a/sys/arch/pmax/dev/cfb.c   Sun Jan 09 03:44:33 2000 +0000
+++ b/sys/arch/pmax/dev/cfb.c   Sun Jan 09 03:55:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cfb.c,v 1.35 2000/01/08 01:02:35 simonb Exp $  */
+/*     $NetBSD: cfb.c,v 1.36 2000/01/09 03:55:29 simonb Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -108,9 +108,8 @@
 /*
  * These need to be mapped into user space.
  */
-struct fbuaccess cfbu;
-struct pmax_fbtty cfbfb;
-struct fbinfo  cfbfi;  /*XXX*/ /* should be softc */
+static struct fbuaccess                cfbu;
+static struct pmax_fbtty       cfbfb;
 
 /*
  * Method table for standard framebuffer operations on a CFB.
@@ -127,8 +126,6 @@
        bt459CursorColor
 };
 
-int    cfbinit __P((struct fbinfo *fi, caddr_t cfbaddr, int unit, int silent));
-
 #define        CFB_OFFSET_VRAM         0x0             /* from module's base */
 #define CFB_OFFSET_BT459       0x200000        /* Bt459 registers */
 #define CFB_OFFSET_IREQ                0x300000        /* Interrupt req. control */
@@ -142,15 +139,15 @@
  * code is completely gone.
  */
 
-int    cfbmatch __P((struct device *, struct cfdata *, void *));
-void   cfbattach __P((struct device *, struct device *, void *));
-int    cfb_intr __P((void *sc));
+static int     cfbmatch __P((struct device *, struct cfdata *, void *));
+static void    cfbattach __P((struct device *, struct device *, void *));
+static int     cfb_intr __P((void *sc));
 
 struct cfattach cfb_ca = {
        sizeof(struct fbsoftc), cfbmatch, cfbattach
 };
 
-int
+static int
 cfbmatch(parent, match, aux)
        struct device *parent;
        struct cfdata *match;
@@ -175,7 +172,7 @@
  * so console-config code can attach cfb devices very early in boot,
  * to use as system console.
  */
-void
+static void
 cfbattach(parent, self, aux)
        struct device *parent;
        struct device *self;
@@ -290,7 +287,7 @@
  * This function simply dismisses CFB interrupts, or the interrupt
  * request from the card will still be active.
  */
-int
+static int
 cfb_intr(sc)
        void *sc;
 {
diff -r 4c39b1059f2b -r f53b1fbe940b sys/arch/pmax/dev/dc.c
--- a/sys/arch/pmax/dev/dc.c    Sun Jan 09 03:44:33 2000 +0000
+++ b/sys/arch/pmax/dev/dc.c    Sun Jan 09 03:55:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dc.c,v 1.57 2000/01/08 01:02:35 simonb Exp $   */
+/*     $NetBSD: dc.c,v 1.58 2000/01/09 03:55:30 simonb Exp $   */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dc.c,v 1.57 2000/01/08 01:02:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dc.c,v 1.58 2000/01/09 03:55:30 simonb Exp $");
 
 /*
  * devDC7085.c --
@@ -105,7 +105,6 @@
 #include <pmax/dev/lk201var.h>         /* XXX KbdReset and friends */
 
 #include <pmax/dev/dcvar.h>
-#include <pmax/dev/dc_cons.h>
 #include <pmax/dev/rconsvar.h>
 #include <pmax/dev/qvssvar.h>          /* XXX mouseInput() */
 
@@ -119,36 +118,29 @@
  * Forward declarations
  */
 struct tty     *dctty __P((dev_t  dev));
-void            dcstart __P((struct tty *));
-void            dcrint __P((struct dc_softc *sc));
-void            dcxint __P((struct tty *));
-int             dcmctl __P((dev_t dev, int bits, int how));
-void            dcscan __P((void *));
-int             dcparam __P((struct tty *tp, struct termios *t));
+static void     dcstart __P((struct tty *));
+static void     dcrint __P((struct dc_softc *sc));
+static void     dcxint __P((struct tty *));
+static int      dcmctl __P((dev_t dev, int bits, int how));
+static void     dcscan __P((void *));
+static int      dcparam __P((struct tty *tp, struct termios *t));
 static int      cold_dcparam __P((struct tty *tp, struct termios *t,
                    struct dc_softc *sc));
-void            dc_reset __P((dcregs *dcaddr));
+static void     dc_reset __P((dcregs *dcaddr));
 
 void            ttrstrt __P((void *));
 
 
 /* console I/O */
-int    dcGetc __P((dev_t));
-void   dcPutc __P((dev_t, int));
-void   dcPollc __P((dev_t, int));
-void   dc_consinit __P((dev_t dev, dcregs *dcaddr));
+static void    dcPollc __P((dev_t, int));
 
-void   dc_tty_init __P((struct dc_softc *sc, dev_t dev));
+static void    dc_tty_init __P((struct dc_softc *sc, dev_t dev));
 #if NRASTERCONSOLE > 0
-void   dc_kbd_init __P((struct dc_softc *sc, dev_t dev));
-void   dc_mouse_init __P((struct dc_softc *sc, dev_t dev));
+static void    dc_kbd_init __P((struct dc_softc *sc, dev_t dev));
+static void    dc_mouse_init __P((struct dc_softc *sc, dev_t dev));
 #endif
 
 
-/* QVSS-compatible in-kernel X input event parser, pointer tracker */
-void   (*dcDivertXInput) __P((int cc)); /* X windows keyboard input routine */
-void   (*dcMouseEvent) __P((int));     /* X windows mouse motion event routine */
-void   (*dcMouseButtons) __P((int));   /* X windows mouse buttons event routine */
 #ifdef DEBUG
 int    debugChar;
 #endif
@@ -158,7 +150,7 @@
  * The DC7085 doesn't interrupt on carrier transitions, so
  * we have to use a timer to watch it.
  */
-int    dc_timer;               /* true if timer started */
+static int     dc_timer;               /* true if timer started */
 
 /*
  * Pdma structures for fast output code
@@ -193,6 +185,11 @@
 #define        LFLAG   (TTYDEF_LFLAG & ~ECHO)
 #endif
 
+/* QVSS-compatible in-kernel X input event parser, pointer tracker */
+void   (*dcDivertXInput) __P((int));
+void   (*dcMouseEvent) __P((void *));
+void   (*dcMouseButtons) __P((void *));
+
 /*
  * Console line variables, for use when cold
  */
@@ -221,26 +218,27 @@
 void
 dc_consinit(dev, dcaddr)
        dev_t dev;
-       dcregs *dcaddr;
+       void *dcaddr;
 {
        struct dc_softc *sc;
+       dcregs *addr = (dcregs *)dcaddr;
 
        /* save address in case we're cold */
        if (cold && dc_cons_addr == 0) {
                /* called while very cold to initalize console output */
-               dc_cons_addr = dcaddr;
+               dc_cons_addr = addr;
                sc = &coldcons_softc;
-               sc->dc_pdma[0].p_addr = (void*)dcaddr;
-               sc->dc_pdma[1].p_addr = (void*)dcaddr;
-               sc->dc_pdma[2].p_addr = (void*)dcaddr;
-               sc->dc_pdma[3].p_addr = (void*)dcaddr;
+               sc->dc_pdma[0].p_addr = (void*)addr;
+               sc->dc_pdma[1].p_addr = (void*)addr;
+               sc->dc_pdma[2].p_addr = (void*)addr;
+               sc->dc_pdma[3].p_addr = (void*)addr;
        } else {
                /* being called from dcattach() to reset console */
                sc = dc_cd.cd_devs[DCUNIT(dev)];
        }
 
        /* reset chip */
-       dc_reset(dcaddr);
+       dc_reset(addr);
 
        dccons.cn_dev = dev;
        *cn_tab = dccons;
@@ -343,7 +341,7 @@
  * Does not enable interrupts; caller must explicitly or
  * TIE and RIE on if desired (XXX not true yet)
  */
-void
+static void
 dc_reset(dcaddr)
        dcregs *dcaddr;
 {
@@ -364,7 +362,7 @@
 /*
  * Initialize line parameters for a serial console.
  */
-void
+static void
 dc_tty_init(sc, dev)
        struct dc_softc *sc;
        dev_t dev;
@@ -383,7 +381,7 @@
 }
 
 #if NRASTERCONSOLE > 0
-void
+static void
 dc_kbd_init(sc, dev)
        struct dc_softc *sc;
        dev_t dev;
@@ -406,7 +404,7 @@
        splx(s);
 }
 
-void
+static void
 dc_mouse_init(sc, dev)
        struct dc_softc *sc;
        dev_t dev;
@@ -660,7 +658,7 @@
  * Set line parameters
  */
 
-int
+static int
 dcparam(tp, t)
        struct tty *tp;
        struct termios *t;
@@ -682,7 +680,7 @@
 /*
  * ttyparam entry point, but callable when very cold.
  */
-int
+static int
 cold_dcparam(tp, t, sc)
        struct tty *tp;
        struct termios *t;
@@ -757,7 +755,7 @@
        return 0;
 }
 
-void
+static void
 dcrint(sc)
        struct dc_softc * sc;
 {
@@ -845,7 +843,7 @@
        DELAY(10);
 }
 
-void



Home | Main Index | Thread Index | Old Index