Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp300/dev - make local functions static



details:   https://anonhg.NetBSD.org/src/rev/6f8ca951e9eb
branches:  trunk
changeset: 762311:6f8ca951e9eb
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Feb 19 05:34:59 2011 +0000

description:
- make local functions static
- use aprint_erorr(9)
- some KNF

diffstat:

 sys/arch/hp300/dev/hil_intio.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r f78984db7ca8 -r 6f8ca951e9eb sys/arch/hp300/dev/hil_intio.c
--- a/sys/arch/hp300/dev/hil_intio.c    Sat Feb 19 04:10:47 2011 +0000
+++ b/sys/arch/hp300/dev/hil_intio.c    Sat Feb 19 05:34:59 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hil_intio.c,v 1.1 2011/02/06 18:26:51 tsutsui Exp $    */
+/*     $NetBSD: hil_intio.c,v 1.2 2011/02/19 05:34:59 tsutsui Exp $    */
 /*     $OpenBSD: hil_intio.c,v 1.8 2007/01/06 20:10:57 miod Exp $      */
 
 /*
@@ -44,8 +44,8 @@
 #include <machine/hil_machdep.h>
 #include <dev/hil/hilvar.h>
 
-int    hil_intio_match(device_t, cfdata_t, void *);
-void   hil_intio_attach(device_t, device_t, void *);
+static int     hil_intio_match(device_t, cfdata_t, void *);
+static void    hil_intio_attach(device_t, device_t, void *);
 
 CFATTACH_DECL_NEW(hil_intio, sizeof(struct hil_softc),
     hil_intio_match, hil_intio_attach, NULL, NULL);
@@ -61,12 +61,12 @@
 
        /* Allow only one instance. */
        if (hil_matched != 0)
-               return (0);
+               return 0;
 
        if (badaddr((void *)ia->ia_addr))       /* should not happen! */
-               return (0);
+               return 0;
 
-       return (1);
+       return 1;
 }
 
 int hil_is_console = -1;       /* undecided */
@@ -81,7 +81,7 @@
        sc->sc_bst = ia->ia_bst;
        if (bus_space_map(sc->sc_bst, ia->ia_iobase,
            HILMAPSIZE, 0, &sc->sc_bsh) != 0) {
-               printf(": couldn't map hil controller\n");
+               aprint_error(": couldn't map hil controller\n");
                return;
        }
 



Home | Main Index | Thread Index | Old Index