Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/news68k - Use ANSI function declarations and make s...



details:   https://anonhg.NetBSD.org/src/rev/2e9a58a1cdd3
branches:  trunk
changeset: 569754:2e9a58a1cdd3
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Sep 04 13:43:11 2004 +0000

description:
- Use ANSI function declarations and make some functions static.
- Some KNF

diffstat:

 sys/arch/news68k/dev/hb.c                 |  33 +++--------
 sys/arch/news68k/dev/if_le.c              |  26 ++------
 sys/arch/news68k/dev/kb.c                 |  36 +++--------
 sys/arch/news68k/dev/kb_hb.c              |  34 ++++-------
 sys/arch/news68k/dev/kb_kbc.c             |  33 ++++------
 sys/arch/news68k/dev/kbc.c                |  18 +----
 sys/arch/news68k/dev/mkclock_hb.c         |  25 +++-----
 sys/arch/news68k/dev/ms.c                 |   7 +-
 sys/arch/news68k/dev/ms_hb.c              |  58 +++++++------------
 sys/arch/news68k/dev/ms_kbc.c             |  57 +++++++-----------
 sys/arch/news68k/dev/si.c                 |  73 ++++++++++--------------
 sys/arch/news68k/dev/timer_hb.c           |  37 +++++-------
 sys/arch/news68k/dev/zs.c                 |  80 +++++++-------------------
 sys/arch/news68k/include/bus.h            |   9 +-
 sys/arch/news68k/news68k/autoconf.c       |   8 +-
 sys/arch/news68k/news68k/bus_space.c      |  61 ++++++-------------
 sys/arch/news68k/news68k/clock.c          |  23 +++----
 sys/arch/news68k/news68k/disksubr.c       |  53 +++++++----------
 sys/arch/news68k/news68k/isr.c            |  45 +++++---------
 sys/arch/news68k/news68k/machdep.c        |  93 +++++++++++++------------------
 sys/arch/news68k/news68k/mainbus.c        |  25 ++------
 sys/arch/news68k/news68k/mem.c            |  34 ++++------
 sys/arch/news68k/news68k/pmap_bootstrap.c |   8 +-
 sys/arch/news68k/news68k/trap.c           |  42 ++++---------
 sys/arch/news68k/stand/boot/boot.c        |   7 +-
 sys/arch/news68k/stand/boot/devopen.c     |  20 ++----
 sys/arch/news68k/stand/bootxx/bootxx.c    |   5 +-
 sys/arch/news68k/stand/common/getchar.c   |   4 +-
 sys/arch/news68k/stand/common/putchar.c   |   5 +-
 29 files changed, 348 insertions(+), 611 deletions(-)

diffs (truncated from 2714 to 300 lines):

diff -r d8af56ffac57 -r 2e9a58a1cdd3 sys/arch/news68k/dev/hb.c
--- a/sys/arch/news68k/dev/hb.c Sat Sep 04 11:28:32 2004 +0000
+++ b/sys/arch/news68k/dev/hb.c Sat Sep 04 13:43:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hb.c,v 1.13 2004/09/04 11:28:32 tsutsui Exp $  */
+/*     $NetBSD: hb.c,v 1.14 2004/09/04 13:43:11 tsutsui Exp $  */
 
 /*-
  * Copyright (C) 1999 Izumi Tsutsui.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hb.c,v 1.13 2004/09/04 11:28:32 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hb.c,v 1.14 2004/09/04 13:43:11 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -51,10 +51,7 @@
     hb_match, hb_attach, NULL, NULL);
 
 static int
-hb_match(parent, cf, aux)
-       struct device *parent;
-       struct cfdata *cf;
-       void *aux;
+hb_match(struct device *parent, struct cfdata *cf, void *aux)
 {
        struct mainbus_attach_args *ma = aux;
 
@@ -68,10 +65,7 @@
 }
 
 static void
-hb_attach(parent, self, aux)
-       struct device *parent;
-       struct device *self;
-       void *aux;
+hb_attach(struct device *parent, struct device *self, void *aux)
 {
        struct hb_attach_args ha;
 
@@ -82,10 +76,7 @@
 }
 
 static int
-hb_search(parent, cf, aux)
-       struct device *parent;
-       struct cfdata *cf;
-       void *aux;
+hb_search(struct device *parent, struct cfdata *cf, void *aux)
 {
        struct hb_attach_args *ha = aux;
 
@@ -109,9 +100,7 @@
  * when there was no match found by config_found().
  */
 static int
-hb_print(args, name)
-       void *args;
-       const char *name;
+hb_print(void *args, const char *name)
 {
        struct hb_attach_args *ha = args;
 
@@ -125,17 +114,14 @@
                aprint_normal (" vect %d", ha->ha_vect);
        }
 
-       return (QUIET);
+       return QUIET;
 }
 
 /*
  * hb_intr_establish: establish hb interrupt
  */
 void
-hb_intr_establish(hbvect, hand, ipl, arg)
-       int hbvect;
-       int (*hand)(void *), ipl;
-       void *arg;
+hb_intr_establish(int hbvect, int (*hand)(void *), int ipl, void *arg)
 {
 
        if ((ipl < 1) || (ipl > 7)) {
@@ -152,8 +138,7 @@
 }
 
 void
-hb_intr_disestablish(hbvect)
-       int hbvect;
+hb_intr_disestablish(int hbvect)
 {
 
        if ((hbvect < 0) || (hbvect > 255)) {
diff -r d8af56ffac57 -r 2e9a58a1cdd3 sys/arch/news68k/dev/if_le.c
--- a/sys/arch/news68k/dev/if_le.c      Sat Sep 04 11:28:32 2004 +0000
+++ b/sys/arch/news68k/dev/if_le.c      Sat Sep 04 13:43:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_le.c,v 1.9 2004/09/04 11:30:39 tsutsui Exp $        */
+/*     $NetBSD: if_le.c,v 1.10 2004/09/04 13:43:11 tsutsui Exp $       */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.9 2004/09/04 11:30:39 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.10 2004/09/04 13:43:11 tsutsui Exp $");
 
 #include "opt_inet.h"
 #include "bpfilter.h"
@@ -116,9 +116,7 @@
 int leintr(int);
 
 hide void
-lewrcsr(sc, port, val)
-       struct lance_softc *sc;
-       u_int16_t port, val;
+lewrcsr(struct lance_softc *sc, u_int16_t port, u_int16_t val)
 {
        struct lereg1 *ler1 = ((struct le_softc *)sc)->sc_r1;
 
@@ -127,23 +125,18 @@
 }
 
 hide u_int16_t
-lerdcsr(sc, port)
-       struct lance_softc *sc;
-       u_int16_t port;
+lerdcsr(struct lance_softc *sc, u_int16_t port)
 {
        struct lereg1 *ler1 = ((struct le_softc *)sc)->sc_r1;
        u_int16_t val;
 
        ler1->ler1_rap = port;
        val = ler1->ler1_rdp;
-       return (val);
+       return val;
 }
 
 int
-le_match(parent, cf, aux)
-       struct device *parent;
-       struct cfdata *cf;
-       void *aux;
+le_match(struct device *parent, struct cfdata *cf, void *aux)
 {
        struct hb_attach_args *ha = aux;
        int addr;
@@ -160,9 +153,7 @@
 }
 
 void
-le_attach(parent, self, aux)
-       struct device *parent, *self;
-       void *aux;
+le_attach(struct device *parent, struct device *self, void *aux)
 {
        struct le_softc *lesc = (struct le_softc *)self;
        struct lance_softc *sc = &lesc->sc_am7990.lsc;
@@ -210,8 +201,7 @@
 }
 
 int
-leintr(unit)
-       int unit;
+leintr(int unit)
 {
        struct am7990_softc *sc;
 
diff -r d8af56ffac57 -r 2e9a58a1cdd3 sys/arch/news68k/dev/kb.c
--- a/sys/arch/news68k/dev/kb.c Sat Sep 04 11:28:32 2004 +0000
+++ b/sys/arch/news68k/dev/kb.c Sat Sep 04 13:43:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kb.c,v 1.5 2003/07/15 02:59:26 lukem Exp $     */
+/*     $NetBSD: kb.c,v 1.6 2004/09/04 13:43:11 tsutsui Exp $   */
 
 /*
  * Copyright (c) 2001 Izumi Tsutsui.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kb.c,v 1.5 2003/07/15 02:59:26 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kb.c,v 1.6 2004/09/04 13:43:11 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -71,8 +71,7 @@
 };
 
 void
-kb_intr(sc)
-       struct kb_softc *sc;
+kb_intr(struct kb_softc *sc)
 {
        struct console_softc *kb_conssc = sc->sc_conssc;
        bus_space_tag_t bt = sc->sc_bt;
@@ -99,8 +98,7 @@
 }
 
 int
-kb_cnattach(conssc_p)
-       struct console_softc *conssc_p;
+kb_cnattach(struct console_softc *conssc_p)
 {
 
        wskbd_cnattach(&kb_consops, conssc_p, &kb_keymapdata);
@@ -108,10 +106,7 @@
 }
 
 void
-kb_cngetc(v, type, data)
-       void *v;
-       u_int *type;
-       int *data;
+kb_cngetc(void *v, u_int *type, int *data)
 {
        struct console_softc *conssc = v;
        u_int nkey;
@@ -132,35 +127,24 @@
 }
 
 void
-kb_cnpollc(v, on)
-       void *v;
-       int on;
+kb_cnpollc(void *v, int on)
 {
 }
 
 int
-kb_enable(v, on)
-       void *v;
-       int on;
+kb_enable(void *v, int on)
 {
+
        return 0;
 }
 
 void
-kb_set_leds(v, on)
-       void *v;
-       int on;
+kb_set_leds(void *v, int on)
 {
-       return;
 }
 
 int
-kb_ioctl(v, cmd, data, flag, p)
-       void *v;
-       u_long cmd;
-       caddr_t data;
-       int flag;
-       struct proc *p;
+kb_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
 {
 #if 0
        struct console_softc *cs = v;
diff -r d8af56ffac57 -r 2e9a58a1cdd3 sys/arch/news68k/dev/kb_hb.c
--- a/sys/arch/news68k/dev/kb_hb.c      Sat Sep 04 11:28:32 2004 +0000
+++ b/sys/arch/news68k/dev/kb_hb.c      Sat Sep 04 13:43:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kb_hb.c,v 1.6 2004/09/04 11:28:32 tsutsui Exp $        */
+/*     $NetBSD: kb_hb.c,v 1.7 2004/09/04 13:43:11 tsutsui Exp $        */
 
 /*
  * Copyright (c) 2001 Izumi Tsutsui.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kb_hb.c,v 1.6 2004/09/04 11:28:32 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kb_hb.c,v 1.7 2004/09/04 13:43:11 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -53,9 +53,9 @@
 #define KB_SIZE 0x10 /* XXX */
 #define KB_PRI 5
 
-int    kb_hb_match(struct device *, struct cfdata *, void *);
-void   kb_hb_attach(struct device *, struct device *, void *);
-void   kb_hb_init(struct kb_softc *);
+static int kb_hb_match(struct device *, struct cfdata *, void *);
+static void kb_hb_attach(struct device *, struct device *, void *);
+static void kb_hb_init(struct kb_softc *);
 int    kb_hb_intr(void *);
 int    kb_hb_cnattach(void);
 
@@ -64,11 +64,8 @@
 
 struct console_softc kb_hb_conssc;
 
-int
-kb_hb_match(parent, cf, aux)



Home | Main Index | Thread Index | Old Index