Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Cosmetic changes:



details:   https://anonhg.NetBSD.org/src/rev/6d2dfa01e8b9
branches:  trunk
changeset: 553183:6d2dfa01e8b9
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Oct 11 17:40:15 2003 +0000

description:
Cosmetic changes:
- Use static to unexport symbols that don't need to be exported.
- ANSI'ify.
- Some whitespace nits.

diffstat:

 sys/dev/pci/acardide.c |   48 ++++++++-----------
 sys/dev/pci/aceride.c  |   46 +++++++------------
 sys/dev/pci/cmdide.c   |  116 +++++++++++++++++++-----------------------------
 sys/dev/pci/cypide.c   |   38 +++++----------
 sys/dev/pci/hptide.c   |   46 +++++++------------
 sys/dev/pci/optiide.c  |   36 +++++---------
 sys/dev/pci/pdcide.c   |   75 +++++++++++-------------------
 sys/dev/pci/piixide.c  |   65 +++++++++++----------------
 sys/dev/pci/siside.c   |   62 ++++++++++---------------
 sys/dev/pci/slide.c    |   38 ++++++---------
 sys/dev/pci/viaide.c   |   50 ++++++++-------------
 11 files changed, 243 insertions(+), 377 deletions(-)

diffs (truncated from 1405 to 300 lines):

diff -r 9d7be1177c1e -r 6d2dfa01e8b9 sys/dev/pci/acardide.c
--- a/sys/dev/pci/acardide.c    Sat Oct 11 12:31:05 2003 +0000
+++ b/sys/dev/pci/acardide.c    Sat Oct 11 17:40:15 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acardide.c,v 1.1 2003/10/08 11:51:59 bouyer Exp $      */
+/*     $NetBSD: acardide.c,v 1.2 2003/10/11 17:40:15 thorpej Exp $     */
 
 /*
  * Copyright (c) 2001 Izumi Tsutsui.
@@ -24,7 +24,6 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
  */
 
 #include <sys/param.h>
@@ -36,17 +35,19 @@
 #include <dev/pci/pciidevar.h>
 #include <dev/pci/pciide_acard_reg.h>
 
-void acard_chip_map __P((struct pciide_softc*, struct pci_attach_args*));
-void acard_setup_channel __P((struct channel_softc*));
-int  acard_pci_intr __P((void *));
+static void acard_chip_map(struct pciide_softc*, struct pci_attach_args*);
+static void acard_setup_channel(struct channel_softc*);
+#if 0 /* XXX !! */
+static int  acard_pci_intr(void *);
+#endif
 
-int    acardide_match __P((struct device *, struct cfdata *, void *));
-void   acardide_attach __P((struct device *, struct device *, void *));
+static int  acardide_match(struct device *, struct cfdata *, void *);
+static void acardide_attach(struct device *, struct device *, void *);
 
 CFATTACH_DECL(acardide, sizeof(struct pciide_softc),
     acardide_match, acardide_attach, NULL, NULL);
 
-const struct pciide_product_desc pciide_acard_products[] =  {
+static const struct pciide_product_desc pciide_acard_products[] =  {
        { PCI_PRODUCT_ACARD_ATP850U,
          IDE_PCI_CLASS_OVERRIDE,
          "Acard ATP850U Ultra33 IDE Controller",
@@ -69,11 +70,8 @@
        }
 };
 
-int
-acardide_match(parent, match, aux)
-       struct device *parent;
-       struct cfdata *match;
-       void *aux;
+static int
+acardide_match(struct device *parent, struct cfdata *match, void *aux)
 {
        struct pci_attach_args *pa = aux;
 
@@ -84,10 +82,8 @@
        return (0);
 }
 
-void
-acardide_attach(parent, self, aux)
-       struct device *parent, *self;
-       void *aux;
+static void
+acardide_attach(struct device *parent, struct device *self, void *aux)
 {
        struct pci_attach_args *pa = aux;
        struct pciide_softc *sc = (struct pciide_softc *)self;
@@ -100,10 +96,8 @@
 #define        ACARD_IS_850(sc)                                                \
        ((sc)->sc_pp->ide_product == PCI_PRODUCT_ACARD_ATP850U)
 
-void
-acard_chip_map(sc, pa)
-       struct pciide_softc *sc;
-       struct pci_attach_args *pa;
+static void
+acard_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
 {
        struct pciide_channel *cp;
        int i;
@@ -159,9 +153,8 @@
        }
 }
 
-void
-acard_setup_channel(chp)
-       struct channel_softc *chp;
+static void
+acard_setup_channel(struct channel_softc *chp)
 {
        struct ata_drive_datas *drvp;
        struct pciide_channel *cp = (struct pciide_channel*)chp;
@@ -271,9 +264,9 @@
        }
 }
 
-int
-acard_pci_intr(arg)
-       void *arg;
+#if 0 /* XXX !! */
+static int
+acard_pci_intr(void *arg)
 {
        struct pciide_softc *sc = arg;
        struct pciide_channel *cp;
@@ -305,3 +298,4 @@
        }
        return rv;
 }
+#endif
diff -r 9d7be1177c1e -r 6d2dfa01e8b9 sys/dev/pci/aceride.c
--- a/sys/dev/pci/aceride.c     Sat Oct 11 12:31:05 2003 +0000
+++ b/sys/dev/pci/aceride.c     Sat Oct 11 17:40:15 2003 +0000
@@ -1,5 +1,4 @@
-/*     $NetBSD: aceride.c,v 1.1 2003/10/08 11:51:59 bouyer Exp $       */
-
+/*     $NetBSD: aceride.c,v 1.2 2003/10/11 17:40:15 thorpej Exp $      */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -28,10 +27,8 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
  */
 
-
 #include <sys/param.h>
 #include <sys/systm.h>
 
@@ -41,17 +38,17 @@
 #include <dev/pci/pciidevar.h>
 #include <dev/pci/pciide_acer_reg.h>
 
-void acer_chip_map __P((struct pciide_softc*, struct pci_attach_args*));
-void acer_setup_channel __P((struct channel_softc*));
-int  acer_pci_intr __P((void *));
+static void acer_chip_map(struct pciide_softc*, struct pci_attach_args*);
+static void acer_setup_channel(struct channel_softc*);
+static int  acer_pci_intr(void *);
 
-int    aceride_match __P((struct device *, struct cfdata *, void *));
-void   aceride_attach __P((struct device *, struct device *, void *));
+static int  aceride_match(struct device *, struct cfdata *, void *);
+static void aceride_attach(struct device *, struct device *, void *);
 
 CFATTACH_DECL(aceride, sizeof(struct pciide_softc),
     aceride_match, aceride_attach, NULL, NULL);
 
-const struct pciide_product_desc pciide_acer_products[] =  {
+static const struct pciide_product_desc pciide_acer_products[] =  {
        { PCI_PRODUCT_ALI_M5229,
          0,
          "Acer Labs M5229 UDMA IDE Controller",
@@ -64,11 +61,8 @@
        }
 };
 
-int
-aceride_match(parent, match, aux)
-       struct device *parent;
-       struct cfdata *match;
-       void *aux;
+static int
+aceride_match(struct device *parent, struct cfdata *match, void *aux)
 {
        struct pci_attach_args *pa = aux;
 
@@ -79,10 +73,8 @@
        return (0);
 }
 
-void
-aceride_attach(parent, self, aux)
-       struct device *parent, *self;
-       void *aux;
+static void
+aceride_attach(struct device *parent, struct device *self, void *aux)
 {
        struct pci_attach_args *pa = aux;
        struct pciide_softc *sc = (struct pciide_softc *)self;
@@ -92,10 +84,8 @@
 
 }
 
-void
-acer_chip_map(sc, pa)
-       struct pciide_softc *sc;
-       struct pci_attach_args *pa;
+static void
+acer_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
 {
        struct pciide_channel *cp;
        int channel;
@@ -176,9 +166,8 @@
        }
 }
 
-void
-acer_setup_channel(chp)
-       struct channel_softc *chp;
+static void
+acer_setup_channel(struct channel_softc *chp)
 {
        struct ata_drive_datas *drvp;
        int drive;
@@ -272,9 +261,8 @@
        }
 }
 
-int
-acer_pci_intr(arg)
-       void *arg;
+static int
+acer_pci_intr(void *arg)
 {
        struct pciide_softc *sc = arg;
        struct pciide_channel *cp;
diff -r 9d7be1177c1e -r 6d2dfa01e8b9 sys/dev/pci/cmdide.c
--- a/sys/dev/pci/cmdide.c      Sat Oct 11 12:31:05 2003 +0000
+++ b/sys/dev/pci/cmdide.c      Sat Oct 11 17:40:15 2003 +0000
@@ -1,5 +1,4 @@
-/*     $NetBSD: cmdide.c,v 1.1 2003/10/08 11:51:59 bouyer Exp $        */
-
+/*     $NetBSD: cmdide.c,v 1.2 2003/10/11 17:40:15 thorpej Exp $       */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -28,10 +27,8 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
  */
 
-
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/malloc.h>
@@ -44,28 +41,28 @@
 #include <dev/pci/pciide_sii3112_reg.h>
 
 
-int    cmdide_match __P((struct device *, struct cfdata *, void *));
-void   cmdide_attach __P((struct device *, struct device *, void *));
+static int  cmdide_match(struct device *, struct cfdata *, void *);
+static void cmdide_attach(struct device *, struct device *, void *);
 
 CFATTACH_DECL(cmdide, sizeof(struct pciide_softc),
     cmdide_match, cmdide_attach, NULL, NULL);
 
-void cmd_chip_map __P((struct pciide_softc*, struct pci_attach_args*));
-void cmd0643_9_chip_map __P((struct pciide_softc*, struct pci_attach_args*));
-void cmd0643_9_setup_channel __P((struct channel_softc*));
-void cmd_channel_map __P((struct pci_attach_args *,
-                       struct pciide_softc *, int));
-int  cmd_pci_intr __P((void *));
-void cmd646_9_irqack __P((struct channel_softc *));
-void cmd680_chip_map __P((struct pciide_softc*, struct pci_attach_args*));
-void cmd680_setup_channel __P((struct channel_softc*));
-void cmd680_channel_map __P((struct pci_attach_args *,
-                       struct pciide_softc *, int));
+static void cmd_chip_map(struct pciide_softc*, struct pci_attach_args*);
+static void cmd0643_9_chip_map(struct pciide_softc*, struct pci_attach_args*);
+static void cmd0643_9_setup_channel(struct channel_softc*);
+static void cmd_channel_map(struct pci_attach_args *, struct pciide_softc *,
+                           int);
+static int  cmd_pci_intr(void *);
+static void cmd646_9_irqack(struct channel_softc *);
+static void cmd680_chip_map(struct pciide_softc*, struct pci_attach_args*);
+static void cmd680_setup_channel(struct channel_softc*);
+static void cmd680_channel_map(struct pci_attach_args *, struct pciide_softc *,
+                              int);
 
-void cmd3112_chip_map __P((struct pciide_softc*, struct pci_attach_args*));
-void cmd3112_setup_channel __P((struct channel_softc*));
+static void cmd3112_chip_map(struct pciide_softc*, struct pci_attach_args*);
+static void cmd3112_setup_channel(struct channel_softc*);
 
-const struct pciide_product_desc pciide_cmd_products[] =  {
+static const struct pciide_product_desc pciide_cmd_products[] =  {
        { PCI_PRODUCT_CMDTECH_640,
          0,
          "CMD Technology PCI0640",
@@ -108,11 +105,8 @@
        }
 };
 
-int
-cmdide_match(parent, match, aux)
-       struct device *parent;
-       struct cfdata *match;
-       void *aux;
+static int
+cmdide_match(struct device *parent, struct cfdata *match, void *aux)
 {



Home | Main Index | Thread Index | Old Index