Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Add/change prototypes so that macpcc builds with -W...



details:   https://anonhg.NetBSD.org/src/rev/ad171c323466
branches:  trunk
changeset: 511416:ad171c323466
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Jun 19 12:02:55 2001 +0000

description:
Add/change prototypes so that macpcc builds with -Wstrict-prototypes.

diffstat:

 sys/arch/macppc/dev/adb_direct.c      |   5 ++-
 sys/arch/macppc/dev/awacs.c           |   9 ++++--
 sys/arch/macppc/dev/dbdma.h           |  33 ++++++++++++++----------
 sys/arch/macppc/dev/gpio.c            |   5 ++-
 sys/arch/macppc/dev/viareg.h          |   8 +++++-
 sys/arch/macppc/include/bus.h         |  46 +++++++++++++++++++++++++++++++++-
 sys/arch/macppc/include/pci_machdep.h |   8 +++---
 sys/arch/macppc/macppc/disksubr.c     |   4 +-
 sys/arch/macppc/pci/pci_machdep.c     |   5 +---
 sys/arch/powerpc/powerpc/openfirm.c   |   9 +++---
 10 files changed, 93 insertions(+), 39 deletions(-)

diffs (truncated from 316 to 300 lines):

diff -r ccd7b971fa82 -r ad171c323466 sys/arch/macppc/dev/adb_direct.c
--- a/sys/arch/macppc/dev/adb_direct.c  Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/macppc/dev/adb_direct.c  Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adb_direct.c,v 1.17 2001/06/08 00:32:01 matt Exp $     */
+/*     $NetBSD: adb_direct.c,v 1.18 2001/06/19 12:02:55 simonb Exp $   */
 
 /* From: adb_direct.c 2.02 4/18/97 jpw */
 
@@ -1009,7 +1009,8 @@
 
                /* call default completion routine if it's valid */
                if (comprout) {
-                       int (*f)() = (void *)comprout;
+                       void (*f)(caddr_t, caddr_t, int) =
+                           (void (*)(caddr_t, caddr_t, int))comprout;
 
                        (*f)(buffer, compdata, cmd);
 #if 0
diff -r ccd7b971fa82 -r ad171c323466 sys/arch/macppc/dev/awacs.c
--- a/sys/arch/macppc/dev/awacs.c       Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/macppc/dev/awacs.c       Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: awacs.c,v 1.10 2001/06/08 00:32:02 matt Exp $  */
+/*     $NetBSD: awacs.c,v 1.11 2001/06/19 12:02:55 simonb Exp $        */
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -111,6 +111,9 @@
 void awacs_set_ext_volume(struct awacs_softc *, int, int);
 int awacs_set_rate(struct awacs_softc *, int);
 
+static void mono16_to_stereo16(void *, u_char *, int);
+static void swap_bytes_mono16_to_stereo16(void *, u_char *, int);
+
 struct cfattach awacs_ca = {
        sizeof(struct awacs_softc), awacs_match, awacs_attach
 };
@@ -300,7 +303,7 @@
        audio_attach_mi(&awacs_hw_if, sc, &sc->sc_dev);
 }
 
-u_int
+static inline u_int
 awacs_read_reg(sc, reg)
        struct awacs_softc *sc;
        int reg;
@@ -310,7 +313,7 @@
        return in32rb(addr + reg);
 }
 
-void
+static inline void
 awacs_write_reg(sc, reg, val)
        struct awacs_softc *sc;
        int reg, val;
diff -r ccd7b971fa82 -r ad171c323466 sys/arch/macppc/dev/dbdma.h
--- a/sys/arch/macppc/dev/dbdma.h       Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/macppc/dev/dbdma.h       Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dbdma.h,v 1.2 1998/08/21 16:13:28 tsubai Exp $ */
+/*     $NetBSD: dbdma.h,v 1.3 2001/06/19 12:02:56 simonb Exp $ */
 
 /*
  * Copyright 1991-1998 by Open Software Foundation, Inc. 
@@ -129,6 +129,11 @@
                                ((branch) << 2) | (wait));              \
        }
 
+static __inline__ void dbdma_st32(volatile u_int32_t *, u_int32_t);
+static __inline__ void dbdma_st16(volatile u_int16_t *, u_int16_t);
+static __inline__ u_int32_t dbdma_ld32(volatile u_int32_t *);
+static __inline__ u_int16_t dbdma_ld16(volatile u_int16_t *);
+
 static __inline__ void
 dbdma_st32(a, x)
        volatile u_int32_t *a;
@@ -181,19 +186,19 @@
  */
 
 struct dbdma_regmap {
-       unsigned long   d_control;      /* Control Register */
-       unsigned long   d_status;       /* DBDMA Status Register */
-       unsigned long   d_cmdptrhi;     /* MSB of command pointer (not used yet) */
-       unsigned long   d_cmdptrlo;     /* LSB of command pointer */
-       unsigned long   d_intselect;    /* Interrupt Select */
-       unsigned long   d_branch;       /* Branch selection */
-       unsigned long   d_wait;         /* Wait selection */
-       unsigned long   d_transmode;    /* Transfer modes */
-       unsigned long   d_dataptrhi;    /* MSB of Data Pointer */
-       unsigned long   d_dataptrlo;    /* LSB of Data Pointer */
-       unsigned long   d_reserved;     /* Reserved for the moment */
-       unsigned long   d_branchptrhi;  /* MSB of Branch Pointer */
-       unsigned long   d_branchptrlo;  /* LSB of Branch Pointer */
+       u_int32_t       d_control;      /* Control Register */
+       u_int32_t       d_status;       /* DBDMA Status Register */
+       u_int32_t       d_cmdptrhi;     /* MSB of command pointer (not used yet) */
+       u_int32_t       d_cmdptrlo;     /* LSB of command pointer */
+       u_int32_t       d_intselect;    /* Interrupt Select */
+       u_int32_t       d_branch;       /* Branch selection */
+       u_int32_t       d_wait;         /* Wait selection */
+       u_int32_t       d_transmode;    /* Transfer modes */
+       u_int32_t       d_dataptrhi;    /* MSB of Data Pointer */
+       u_int32_t       d_dataptrlo;    /* LSB of Data Pointer */
+       u_int32_t       d_reserved;     /* Reserved for the moment */
+       u_int32_t       d_branchptrhi;  /* MSB of Branch Pointer */
+       u_int32_t       d_branchptrlo;  /* LSB of Branch Pointer */
        /* The remaining fields are undefinied and unimplemented */
 };
 
diff -r ccd7b971fa82 -r ad171c323466 sys/arch/macppc/dev/gpio.c
--- a/sys/arch/macppc/dev/gpio.c        Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/macppc/dev/gpio.c        Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gpio.c,v 1.2 2001/02/27 05:16:33 matt Exp $    */
+/*     $NetBSD: gpio.c,v 1.3 2001/06/19 12:02:56 simonb Exp $  */
 
 /*-
  * Copyright (C) 1998  Internet Research Institute, Inc.
@@ -40,6 +40,8 @@
 #include <machine/autoconf.h>
 #include <machine/pio.h>
 
+#include <dev/ofw/openfirm.h>
+
 #include "adb.h"
 
 static void gpio_obio_attach (struct device *, struct device *, void *);
@@ -169,7 +171,6 @@
 int
 gpio_intr(void *arg)
 {
-       struct gpio_softc *sc = arg;
        int rv = 0;
 
 #if NADB > 0
diff -r ccd7b971fa82 -r ad171c323466 sys/arch/macppc/dev/viareg.h
--- a/sys/arch/macppc/dev/viareg.h      Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/macppc/dev/viareg.h      Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: viareg.h,v 1.3 2001/04/01 15:14:36 tsubai Exp $        */
+/*     $NetBSD: viareg.h,v 1.4 2001/06/19 12:02:56 simonb Exp $        */
 
 /*-
  * Copyright (C) 1993  Allen K. Briggs, Chris P. Caputo,
@@ -188,6 +188,12 @@
 
 #include <machine/pio.h>
 
+static __inline void via_reg_and(int, int, int);
+static __inline void via_reg_or(int, int, int);
+static __inline void via_reg_xor(int, int, int);
+static __inline void write_via_reg(int, int, int);
+static __inline int read_via_reg(int, int);
+
 static __inline void
 via_reg_and(ign, reg, val) 
        int ign, reg, val;
diff -r ccd7b971fa82 -r ad171c323466 sys/arch/macppc/include/bus.h
--- a/sys/arch/macppc/include/bus.h     Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/macppc/include/bus.h     Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.12 2001/03/07 22:42:18 thorpej Exp $ */
+/*     $NetBSD: bus.h,v 1.13 2001/06/19 12:02:57 simonb Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -71,6 +71,7 @@
 #ifndef _MACPPC_BUS_H_
 #define _MACPPC_BUS_H_
 
+#include <machine/autoconf.h>
 #include <machine/pio.h>
 
 /*
@@ -109,7 +110,48 @@
 #define BUS_SPACE_MAP_LINEAR           0x02
 #define BUS_SPACE_MAP_PREFETCHABLE     0x04
 
-extern void * mapiodev __P((paddr_t, psize_t));
+static __inline int bus_space_map(bus_space_tag_t, bus_addr_t,
+    bus_size_t, int, bus_space_handle_t *);
+static __inline void bus_space_read_region_1(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int8_t *, size_t);
+static __inline void bus_space_read_region_2(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int16_t *, size_t);
+static __inline void bus_space_read_region_4(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int32_t *, size_t);
+static __inline void bus_space_read_region_stream_2(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int16_t *, size_t);
+static __inline void bus_space_read_region_stream_4(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int32_t *, size_t);
+static __inline void bus_space_write_region_1(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, const u_int8_t *, size_t);
+static __inline void bus_space_write_region_2(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, const u_int16_t *, size_t);
+static __inline void bus_space_write_region_4(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, const u_int32_t *, size_t);
+static __inline void bus_space_write_region_stream_2(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, const u_int16_t *, size_t);
+static __inline void bus_space_write_region_stream_4(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, const u_int32_t *, size_t);
+static __inline void bus_space_set_multi_1(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int8_t, size_t);
+static __inline void bus_space_set_multi_2(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int16_t, size_t);
+static __inline void bus_space_set_multi_4(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int32_t, size_t);
+static __inline void bus_space_set_multi_stream_2(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int16_t, size_t);
+static __inline void bus_space_set_multi_stream_4(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int32_t, size_t);
+static __inline void bus_space_set_region_1(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int8_t, size_t);
+static __inline void bus_space_set_region_2(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int16_t, size_t);
+static __inline void bus_space_set_region_4(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int32_t, size_t);
+static __inline void bus_space_set_region_stream_2(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int16_t, size_t);
+static __inline void bus_space_set_region_stream_4(bus_space_tag_t,
+    bus_space_handle_t, bus_size_t, u_int32_t, size_t);
 
 static __inline int
 bus_space_map(t, addr, size, flags, bshp)
diff -r ccd7b971fa82 -r ad171c323466 sys/arch/macppc/include/pci_machdep.h
--- a/sys/arch/macppc/include/pci_machdep.h     Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/macppc/include/pci_machdep.h     Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.h,v 1.14 2001/06/08 00:32:03 matt Exp $    */
+/*     $NetBSD: pci_machdep.h,v 1.15 2001/06/19 12:02:57 simonb Exp $  */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -63,8 +63,8 @@
        int bus;
        bus_space_tag_t memt;
        bus_space_tag_t iot;
-       pcireg_t (*conf_read)();
-       void (*conf_write)();
+       pcireg_t (*conf_read)(pci_chipset_tag_t, pcitag_t, int);
+       void (*conf_write)(pci_chipset_tag_t, pcitag_t, int, pcireg_t);
 };
 
 extern struct macppc_bus_dma_tag pci_bus_dma_tag;
@@ -92,4 +92,4 @@
  * Internal functions.
  */
 void           pci_init(int);
-int            pcidev_to_ofdev (pci_chipset_tag_t, pcitag_t);
+int            pcidev_to_ofdev(pci_chipset_tag_t, pcitag_t);
diff -r ccd7b971fa82 -r ad171c323466 sys/arch/macppc/macppc/disksubr.c
--- a/sys/arch/macppc/macppc/disksubr.c Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/macppc/macppc/disksubr.c Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.14 2001/06/08 00:32:03 matt Exp $       */
+/*     $NetBSD: disksubr.c,v 1.15 2001/06/19 12:02:57 simonb Exp $     */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -588,7 +588,7 @@
 int
 writedisklabel(dev, strat, lp, osdep)
        dev_t dev;
-       void (*strat)();
+       void (*strat)(struct buf *);
        struct disklabel *lp;
        struct cpu_disklabel *osdep;
 {
diff -r ccd7b971fa82 -r ad171c323466 sys/arch/macppc/pci/pci_machdep.c
--- a/sys/arch/macppc/pci/pci_machdep.c Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/macppc/pci/pci_machdep.c Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.16 2001/06/06 17:50:17 matt Exp $    */
+/*     $NetBSD: pci_machdep.c,v 1.17 2001/06/19 12:02:57 simonb Exp $  */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -254,9 +254,6 @@
        return NULL;
 }
 
-extern void * intr_establish();
-extern void intr_disestablish();
-
 void *
 pci_intr_establish(pc, ih, level, func, arg)
        pci_chipset_tag_t pc;
diff -r ccd7b971fa82 -r ad171c323466 sys/arch/powerpc/powerpc/openfirm.c
--- a/sys/arch/powerpc/powerpc/openfirm.c       Tue Jun 19 11:56:27 2001 +0000
+++ b/sys/arch/powerpc/powerpc/openfirm.c       Tue Jun 19 12:02:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: openfirm.c,v 1.9 2001/06/13 06:01:50 simonb Exp $      */
+/*     $NetBSD: openfirm.c,v 1.10 2001/06/19 12:02:58 simonb Exp $     */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -631,15 +631,14 @@
 }
 



Home | Main Index | Thread Index | Old Index