Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic ANSIfy, KNF.



details:   https://anonhg.NetBSD.org/src/rev/3da52c770723
branches:  trunk
changeset: 534545:3da52c770723
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Jul 29 05:54:09 2002 +0000

description:
ANSIfy, KNF.

diffstat:

 sys/dev/ic/com.c |  276 ++++++++++++++++++------------------------------------
 1 files changed, 93 insertions(+), 183 deletions(-)

diffs (truncated from 660 to 300 lines):

diff -r 80f01d676d06 -r 3da52c770723 sys/dev/ic/com.c
--- a/sys/dev/ic/com.c  Mon Jul 29 05:23:30 2002 +0000
+++ b/sys/dev/ic/com.c  Mon Jul 29 05:54:09 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com.c,v 1.196 2002/04/13 17:05:16 christos Exp $       */
+/*     $NetBSD: com.c,v 1.197 2002/07/29 05:54:09 simonb Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.196 2002/04/13 17:05:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.197 2002/07/29 05:54:09 simonb Exp $");
 
 #include "opt_com.h"
 #include "opt_ddb.h"
@@ -131,56 +131,56 @@
 #include <dev/cons.h>
 
 #ifdef COM_HAYESP
-int comprobeHAYESP __P((bus_space_handle_t hayespioh, struct com_softc *sc));
+int comprobeHAYESP(bus_space_handle_t hayespioh, struct com_softc *sc);
 #endif
 
-static void com_enable_debugport __P((struct com_softc *));
+static void com_enable_debugport(struct com_softc *);
 
-void   com_config      __P((struct com_softc *));
-void   com_shutdown    __P((struct com_softc *));
-int    comspeed        __P((long, long));
-static u_char  cflag2lcr __P((tcflag_t));
-int    comparam        __P((struct tty *, struct termios *));
-void   comstart        __P((struct tty *));
-int    comhwiflow      __P((struct tty *, int));
+void   com_config(struct com_softc *);
+void   com_shutdown(struct com_softc *);
+int    comspeed(long, long);
+static u_char  cflag2lcr(tcflag_t);
+int    comparam(struct tty *, struct termios *);
+void   comstart(struct tty *);
+int    comhwiflow(struct tty *, int);
 
-void   com_loadchannelregs __P((struct com_softc *));
-void   com_hwiflow     __P((struct com_softc *));
-void   com_break       __P((struct com_softc *, int));
-void   com_modem       __P((struct com_softc *, int));
-void   tiocm_to_com    __P((struct com_softc *, u_long, int));
-int    com_to_tiocm    __P((struct com_softc *));
-void   com_iflush      __P((struct com_softc *));
+void   com_loadchannelregs(struct com_softc *);
+void   com_hwiflow(struct com_softc *);
+void   com_break(struct com_softc *, int);
+void   com_modem(struct com_softc *, int);
+void   tiocm_to_com(struct com_softc *, u_long, int);
+int    com_to_tiocm(struct com_softc *);
+void   com_iflush(struct com_softc *);
 
-int    com_common_getc __P((dev_t, bus_space_tag_t, bus_space_handle_t));
-void   com_common_putc __P((dev_t, bus_space_tag_t, bus_space_handle_t, int));
+int    com_common_getc(dev_t, bus_space_tag_t, bus_space_handle_t);
+void   com_common_putc(dev_t, bus_space_tag_t, bus_space_handle_t, int);
 
-int cominit            __P((bus_space_tag_t, bus_addr_t, int, int, tcflag_t,
-                            bus_space_handle_t *));
+int cominit(bus_space_tag_t, bus_addr_t, int, int, tcflag_t,
+                            bus_space_handle_t *);
 
 /* XXX: This belongs elsewhere */
 cdev_decl(com);
 
-int    comcngetc       __P((dev_t));
-void   comcnputc       __P((dev_t, int));
-void   comcnpollc      __P((dev_t, int));
+int    comcngetc(dev_t);
+void   comcnputc(dev_t, int);
+void   comcnpollc(dev_t, int);
 
 #define        integrate       static inline
 #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
-void   comsoft         __P((void *));
+void   comsoft(void *);
 #else
 #ifndef __NO_SOFT_SERIAL_INTERRUPT
-void   comsoft         __P((void));
+void   comsoft(void);
 #else
-void   comsoft         __P((void *));
+void   comsoft(void *);
 struct callout comsoft_callout = CALLOUT_INITIALIZER;
 #endif
 #endif
-integrate void com_rxsoft      __P((struct com_softc *, struct tty *));
-integrate void com_txsoft      __P((struct com_softc *, struct tty *));
-integrate void com_stsoft      __P((struct com_softc *, struct tty *));
-integrate void com_schedrx     __P((struct com_softc *));
-void   comdiag         __P((void *));
+integrate void com_rxsoft(struct com_softc *, struct tty *);
+integrate void com_txsoft(struct com_softc *, struct tty *);
+integrate void com_stsoft(struct com_softc *, struct tty *);
+integrate void com_schedrx(struct com_softc *);
+void   comdiag(void *);
 
 extern struct cfdriver com_cd;
 
@@ -225,8 +225,8 @@
 static bus_space_handle_t com_kgdb_ioh;
 static int com_kgdb_attached;
 
-int    com_kgdb_getc __P((void *));
-void   com_kgdb_putc __P((void *, int));
+int    com_kgdb_getc(void *);
+void   com_kgdb_putc(void *, int);
 #endif /* KGDB */
 
 #define        COMUNIT_MASK    0x7ffff
@@ -255,8 +255,7 @@
 #endif
 
 int
-comspeed(speed, frequency)
-       long speed, frequency;
+comspeed(long speed, long frequency)
 {
 #define        divrnd(n, q)    (((n)*2/(q)+1)/2)       /* divide and round off */
 
@@ -284,11 +283,9 @@
 #ifdef COM_DEBUG
 int    com_debug = 0;
 
-void comstatus __P((struct com_softc *, char *));
+void comstatus(struct com_softc *, char *);
 void
-comstatus(sc, str)
-       struct com_softc *sc;
-       char *str;
+comstatus(struct com_softc *sc, char *str)
 {
        struct tty *tp = sc->sc_tty;
 
@@ -311,9 +308,7 @@
 #endif
 
 int
-comprobe1(iot, ioh)
-       bus_space_tag_t iot;
-       bus_space_handle_t ioh;
+comprobe1(bus_space_tag_t iot, bus_space_handle_t ioh)
 {
 
        /* force access to id reg */
@@ -328,9 +323,7 @@
 
 #ifdef COM_HAYESP
 int
-comprobeHAYESP(hayespioh, sc)
-       bus_space_handle_t hayespioh;
-       struct com_softc *sc;
+comprobeHAYESP(bus_space_handle_t hayespioh, struct com_softc *sc)
 {
        char    val, dips;
        int     combaselist[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
@@ -392,8 +385,7 @@
 #endif
 
 static void
-com_enable_debugport(sc)
-       struct com_softc *sc;
+com_enable_debugport(struct com_softc *sc)
 {
        int s;
 
@@ -409,8 +401,7 @@
 }
 
 void
-com_attach_subr(sc)
-       struct com_softc *sc;
+com_attach_subr(struct com_softc *sc)
 {
        bus_addr_t iobase = sc->sc_iobase;
        bus_space_tag_t iot = sc->sc_iot;
@@ -592,8 +583,7 @@
 }
 
 void
-com_config(sc)
-       struct com_softc *sc;
+com_config(struct com_softc *sc)
 {
        bus_space_tag_t iot = sc->sc_iot;
        bus_space_handle_t ioh = sc->sc_ioh;
@@ -641,9 +631,7 @@
 }
 
 int
-com_detach(self, flags)
-       struct device *self;
-       int flags;
+com_detach(struct device *self, int flags)
 {
        struct com_softc *sc = (struct com_softc *)self;
        int maj, mn;
@@ -690,9 +678,7 @@
 }
 
 int
-com_activate(self, act)
-       struct device *self;
-       enum devact act;
+com_activate(struct device *self, enum devact act)
 {
        struct com_softc *sc = (struct com_softc *)self;
        int s, rv = 0;
@@ -723,8 +709,7 @@
 }
 
 void
-com_shutdown(sc)
-       struct com_softc *sc;
+com_shutdown(struct com_softc *sc)
 {
        struct tty *tp = sc->sc_tty;
        int s;
@@ -778,10 +763,7 @@
 }
 
 int
-comopen(dev, flag, mode, p)
-       dev_t dev;
-       int flag, mode;
-       struct proc *p;
+comopen(dev_t dev, int flag, int mode, struct proc *p)
 {
        struct com_softc *sc;
        struct tty *tp;
@@ -931,10 +913,7 @@
 }
  
 int
-comclose(dev, flag, mode, p)
-       dev_t dev;
-       int flag, mode;
-       struct proc *p;
+comclose(dev_t dev, int flag, int mode, struct proc *p)
 {
        struct com_softc *sc = device_lookup(&com_cd, COMUNIT(dev));
        struct tty *tp = sc->sc_tty;
@@ -962,10 +941,7 @@
 }
  
 int
-comread(dev, uio, flag)
-       dev_t dev;
-       struct uio *uio;
-       int flag;
+comread(dev_t dev, struct uio *uio, int flag)
 {
        struct com_softc *sc = device_lookup(&com_cd, COMUNIT(dev));
        struct tty *tp = sc->sc_tty;
@@ -977,10 +953,7 @@
 }
  
 int
-comwrite(dev, uio, flag)
-       dev_t dev;
-       struct uio *uio;
-       int flag;
+comwrite(dev_t dev, struct uio *uio, int flag)
 {
        struct com_softc *sc = device_lookup(&com_cd, COMUNIT(dev));
        struct tty *tp = sc->sc_tty;
@@ -992,10 +965,7 @@
 }
 
 int
-compoll(dev, events, p)
-       dev_t dev;
-       int events;
-       struct proc *p;
+compoll(dev_t dev, int events, struct proc *p)
 {
        struct com_softc *sc = device_lookup(&com_cd, COMUNIT(dev));
        struct tty *tp = sc->sc_tty;
@@ -1007,8 +977,7 @@
 }
 
 struct tty *
-comtty(dev)
-       dev_t dev;
+comtty(dev_t dev)
 {
        struct com_softc *sc = device_lookup(&com_cd, COMUNIT(dev));
        struct tty *tp = sc->sc_tty;
@@ -1017,12 +986,7 @@
 }
 
 int
-comioctl(dev, cmd, data, flag, p)



Home | Main Index | Thread Index | Old Index