Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ata KNF and whitespace (and indent a contuation line)



details:   https://anonhg.NetBSD.org/src/rev/f1bda33ffba3
branches:  trunk
changeset: 549314:f1bda33ffba3
user:      dsl <dsl%NetBSD.org@localhost>
date:      Fri Jul 11 15:33:13 2003 +0000

description:
KNF and whitespace (and indent a contuation line)

diffstat:

 sys/dev/ata/wd.c |  212 +++++++++++++++++++-----------------------------------
 1 files changed, 77 insertions(+), 135 deletions(-)

diffs (truncated from 582 to 300 lines):

diff -r 839dfcb074e6 -r f1bda33ffba3 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c  Fri Jul 11 15:28:58 2003 +0000
+++ b/sys/dev/ata/wd.c  Fri Jul 11 15:33:13 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wd.c,v 1.258 2003/07/10 23:23:44 matt Exp $ */
+/*     $NetBSD: wd.c,v 1.259 2003/07/11 15:33:13 dsl Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -20,7 +20,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,     
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.258 2003/07/10 23:23:44 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.259 2003/07/11 15:33:13 dsl Exp $");
 
 #ifndef WDCDEBUG
 #define WDCDEBUG
@@ -134,12 +134,12 @@
 #define WDCDEBUG_PRINT(args, level)
 #endif
 
-int    wdprobe         __P((struct device *, struct cfdata *, void *));
-void   wdattach        __P((struct device *, struct device *, void *));
-int    wddetach __P((struct device *, int));
-int    wdactivate __P((struct device *, enum devact));
-int    wdprint __P((void *, char *));
-void   wdperror __P((const struct wd_softc *));
+int    wdprobe(struct device *, struct cfdata *, void *);
+void   wdattach(struct device *, struct device *, void *);
+int    wddetach(struct device *, int);
+int    wdactivate(struct device *, enum devact);
+int    wdprint(void *, char *);
+void   wdperror(const struct wd_softc *);
 
 CFATTACH_DECL(wd, sizeof(struct wd_softc),
     wdprobe, wdattach, wddetach, wdactivate);
@@ -179,30 +179,30 @@
 
 LIST_HEAD(, wd_ioctl) wi_head;
 
-struct wd_ioctl *wi_find __P((struct buf *));
-void   wi_free __P((struct wd_ioctl *));
-struct wd_ioctl *wi_get __P((void));
-void   wdioctlstrategy __P((struct buf *));
+struct wd_ioctl *wi_find(struct buf *);
+void   wi_free(struct wd_ioctl *);
+struct wd_ioctl *wi_get(void);
+void   wdioctlstrategy(struct buf *);
 
-void  wdgetdefaultlabel __P((struct wd_softc *, struct disklabel *));
-void  wdgetdisklabel   __P((struct wd_softc *));
-void  wdstart  __P((void *));
-void  __wdstart        __P((struct wd_softc*, struct buf *));
-void  wdrestart __P((void*));
-int   wd_get_params __P((struct wd_softc *, u_int8_t, struct ataparams *));
-void  wd_flushcache __P((struct wd_softc *, int));
-void  wd_shutdown __P((void*));
+void  wdgetdefaultlabel(struct wd_softc *, struct disklabel *);
+void  wdgetdisklabel(struct wd_softc *);
+void  wdstart(void *);
+void  __wdstart(struct wd_softc*, struct buf *);
+void  wdrestart(void *);
+int   wd_get_params(struct wd_softc *, u_int8_t, struct ataparams *);
+void  wd_flushcache(struct wd_softc *, int);
+void  wd_shutdown(void *);
 
-int   wd_getcache __P((struct wd_softc *, int *));
-int   wd_setcache __P((struct wd_softc *, int));
+int   wd_getcache(struct wd_softc *, int *);
+int   wd_setcache(struct wd_softc *, int);
 
 struct dkdriver wddkdriver = { wdstrategy };
 
 #ifdef HAS_BAD144_HANDLING
-static void bad144intern __P((struct wd_softc *));
+static void bad144intern(struct wd_softc *);
 #endif
-int    wdlock  __P((struct wd_softc *));
-void   wdunlock        __P((struct wd_softc *));
+int    wdlock(struct wd_softc *);
+void   wdunlock(struct wd_softc *);
 
 #define        WD_QUIRK_SPLIT_MOD15_WRITE      0x0001  /* must split certain writes */
 
@@ -253,11 +253,7 @@
 }
 
 int
-wdprobe(parent, match, aux)
-       struct device *parent;
-       struct cfdata *match;
-
-       void *aux;
+wdprobe(struct device *parent, struct cfdata *match, void *aux)
 {
        struct ata_device *adev = aux;
 
@@ -277,9 +273,7 @@
 }
 
 void
-wdattach(parent, self, aux)
-       struct device *parent, *self;
-       void *aux;
+wdattach(struct device *parent, struct device *self, void *aux)
 {
        struct wd_softc *wd = (void *)self;
        struct ata_device *adev= aux;
@@ -395,7 +389,7 @@
        wd->sc_sdhook = shutdownhook_establish(wd_shutdown, wd);
        if (wd->sc_sdhook == NULL)
                aprint_error("%s: WARNING: unable to establish shutdown hook\n",
-                   wd->sc_dev.dv_xname); 
+                   wd->sc_dev.dv_xname);
 #if NRND > 0
        rnd_attach_source(&wd->rnd_source, wd->sc_dev.dv_xname,
                          RND_TYPE_DISK, 0);
@@ -403,9 +397,7 @@
 }
 
 int
-wdactivate(self, act)
-       struct device *self;
-       enum devact act;
+wdactivate(struct device *self, enum devact act)
 {
        int rv = 0;
 
@@ -424,9 +416,7 @@
 }
 
 int
-wddetach(self, flags)
-       struct device *self;
-       int flags;
+wddetach(struct device *self, int flags)
 {
        struct wd_softc *sc = (struct wd_softc *)self;
        struct buf *bp;
@@ -446,10 +436,10 @@
 
        s = splbio();
 
-       /* Kill off any queued buffers. */ 
+       /* Kill off any queued buffers. */
        while ((bp = BUFQ_GET(&sc->sc_q)) != NULL) {
                bp->b_error = EIO;
-               bp->b_flags |= B_ERROR; 
+               bp->b_flags |= B_ERROR;
                bp->b_resid = bp->b_bcount;
                biodone(bp);
        }
@@ -485,8 +475,7 @@
  * transfer.  Does not wait for the transfer to complete.
  */
 void
-wdstrategy(bp)
-       struct buf *bp;
+wdstrategy(struct buf *bp)
 {
        struct wd_softc *wd = device_lookup(&wd_cd, WDUNIT(bp->b_dev));
        struct disklabel *lp = wd->sc_dk.dk_label;
@@ -495,7 +484,7 @@
 
        WDCDEBUG_PRINT(("wdstrategy (%s)\n", wd->sc_dev.dv_xname),
            DEBUG_XFERS);
-       
+
        /* Valid request?  */
        if (bp->b_blkno < 0 ||
            (bp->b_bcount % lp->d_secsize) != 0 ||
@@ -503,7 +492,7 @@
                bp->b_error = EINVAL;
                goto bad;
        }
-       
+
        /* If device invalidated (e.g. media change, door open), error. */
        if ((wd->sc_flags & WDF_LOADED) == 0) {
                bp->b_error = EIO;
@@ -580,8 +569,7 @@
  * Queue a drive for I/O.
  */
 void
-wdstart(arg)
-       void *arg;
+wdstart(void *arg)
 {
        struct wd_softc *wd = arg;
        struct buf *bp = NULL;
@@ -593,8 +581,8 @@
                /* Is there a buf for us ? */
                if ((bp = BUFQ_GET(&wd->sc_q)) == NULL)
                        return;
-       
-               /* 
+
+               /*
                 * Make the command. First lock the device
                 */
                wd->openings--;
@@ -649,9 +637,7 @@
 }
 
 void
-__wdstart(wd, bp)
-       struct wd_softc *wd;
-       struct buf *bp;
+__wdstart(struct wd_softc *wd, struct buf *bp)
 {
 
        /*
@@ -736,8 +722,7 @@
 }
 
 void
-wddone(v)
-       void *v;
+wddone(void *v)
 {
        struct wd_softc *wd = v;
        struct buf *bp = wd->sc_bp;
@@ -831,8 +816,7 @@
 }
 
 void
-wdrestart(v)
-       void *v;
+wdrestart(void *v)
 {
        struct wd_softc *wd = v;
        struct buf *bp = wd->sc_bp;
@@ -846,10 +830,7 @@
 }
 
 int
-wdread(dev, uio, flags)
-       dev_t dev;
-       struct uio *uio;
-       int flags;
+wdread(dev_t dev, struct uio *uio, int flags)
 {
 
        WDCDEBUG_PRINT(("wdread\n"), DEBUG_XFERS);
@@ -857,10 +838,7 @@
 }
 
 int
-wdwrite(dev, uio, flags)
-       dev_t dev;
-       struct uio *uio;
-       int flags;
+wdwrite(dev_t dev, struct uio *uio, int flags)
 {
 
        WDCDEBUG_PRINT(("wdwrite\n"), DEBUG_XFERS);
@@ -874,8 +852,7 @@
  * Several drivers do this; it should be abstracted and made MP-safe.
  */
 int
-wdlock(wd)
-       struct wd_softc *wd;
+wdlock(struct wd_softc *wd)
 {
        int error;
        int s;
@@ -901,8 +878,7 @@
  * Unlock and wake up any waiters.
  */
 void
-wdunlock(wd)
-       struct wd_softc *wd;
+wdunlock(struct wd_softc *wd)
 {
 
        WDCDEBUG_PRINT(("wdunlock\n"), DEBUG_FUNCS);
@@ -915,10 +891,7 @@
 }
 
 int
-wdopen(dev, flag, fmt, p)
-       dev_t dev;
-       int flag, fmt;
-       struct proc *p;
+wdopen(dev_t dev, int flag, int fmt, struct proc *p)
 {
        struct wd_softc *wd;
        int part, error;
@@ -969,7 +942,7 @@
                error = ENXIO;



Home | Main Index | Thread Index | Old Index