summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-06-04 13:40:15 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-06-04 13:40:15 +0000
commitf1b9f6cdc3f799433b4d50fd67da6e828f80c418 (patch)
tree9247f7c465cd357e6e6030fb7fa84eb6b9bf0436
parent00415a03ed157fee94b097aba510ef990442ce06 (diff)
Cleanup for -Wall & -Wstrict-prototypes
-rw-r--r--sys/arch/amiga/isa/cross.c57
-rw-r--r--sys/arch/amiga/isa/crossreg.h4
-rw-r--r--sys/arch/amiga/isa/crossvar.h4
-rw-r--r--sys/arch/amiga/isa/ggbus.c57
-rw-r--r--sys/arch/amiga/isa/ggbusvar.h4
5 files changed, 68 insertions, 58 deletions
diff --git a/sys/arch/amiga/isa/cross.c b/sys/arch/amiga/isa/cross.c
index 923f059eccf..e7f758c19f2 100644
--- a/sys/arch/amiga/isa/cross.c
+++ b/sys/arch/amiga/isa/cross.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cross.c,v 1.3 1996/04/27 18:38:55 niklas Exp $ */
+/* $OpenBSD: cross.c,v 1.4 1996/06/04 13:40:13 niklas Exp $ */
/*
* Copyright (c) 1994, 1996 Niklas Hallqvist, Carsten Hammer
@@ -35,6 +35,7 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
+#include <sys/systm.h>
#include <machine/bus.h>
#include <machine/cpu.h>
@@ -58,46 +59,50 @@ void crossattach __P((struct device *, struct device *, void *));
int crossmatch __P((struct device *, void *, void *));
int crossprint __P((void *, char *));
-int cross_io_map(bus_chipset_tag_t, bus_io_addr_t, bus_io_size_t,
- bus_io_handle_t *);
-int cross_mem_map(bus_chipset_tag_t, bus_mem_addr_t, bus_mem_size_t, int,
- bus_mem_handle_t *);
+int cross_io_map __P((bus_chipset_tag_t, bus_io_addr_t, bus_io_size_t,
+ bus_io_handle_t *));
+int cross_mem_map __P((bus_chipset_tag_t, bus_mem_addr_t, bus_mem_size_t,
+ int, bus_mem_handle_t *));
-void cross_io_read_multi_1(bus_io_handle_t, bus_io_size_t, u_int8_t *,
- bus_io_size_t);
-void cross_io_read_multi_2(bus_io_handle_t, bus_io_size_t, u_int16_t *,
- bus_io_size_t);
+void cross_io_read_multi_1 __P((bus_io_handle_t, bus_io_size_t, u_int8_t *,
+ bus_io_size_t));
+void cross_io_read_multi_2 __P((bus_io_handle_t, bus_io_size_t, u_int16_t *,
+ bus_io_size_t));
-void cross_io_write_multi_1(bus_io_handle_t, bus_io_size_t,
- const u_int8_t *, bus_io_size_t);
-void cross_io_write_multi_2(bus_io_handle_t, bus_io_size_t,
- const u_int16_t *, bus_io_size_t);
+void cross_io_write_multi_1 __P((bus_io_handle_t, bus_io_size_t,
+ const u_int8_t *, bus_io_size_t));
+void cross_io_write_multi_2 __P((bus_io_handle_t, bus_io_size_t,
+ const u_int16_t *, bus_io_size_t));
/*
* Note that the following unified access functions are prototyped for the
* I/O access case. We use casts to get type correctness.
*/
-int cross_unmap(bus_io_handle_t, bus_io_size_t);
+int cross_unmap __P((bus_io_handle_t, bus_io_size_t));
-__inline u_int8_t cross_read_1(bus_io_handle_t, bus_io_size_t);
-__inline u_int16_t cross_read_2(bus_io_handle_t, bus_io_size_t);
+__inline u_int8_t cross_read_1 __P((bus_io_handle_t, bus_io_size_t));
+__inline u_int16_t cross_read_2 __P((bus_io_handle_t, bus_io_size_t));
-__inline void cross_write_1(bus_io_handle_t, bus_io_size_t, u_int8_t);
-__inline void cross_write_2(bus_io_handle_t, bus_io_size_t, u_int16_t);
+__inline void cross_write_1 __P((bus_io_handle_t, bus_io_size_t, u_int8_t));
+__inline void cross_write_2 __P((bus_io_handle_t, bus_io_size_t, u_int16_t));
/*
* In order to share the access function implementations for I/O and memory
* access we cast the functions for the memory access case. These typedefs
* make that casting look nicer.
*/
-typedef int (*bus_mem_unmap_t)(bus_mem_handle_t, bus_mem_size_t);
-typedef u_int8_t (*bus_mem_read_1_t)(bus_mem_handle_t, bus_mem_size_t);
-typedef u_int16_t (*bus_mem_read_2_t)(bus_mem_handle_t, bus_mem_size_t);
-typedef void (*bus_mem_write_1_t)(bus_mem_handle_t, bus_mem_size_t, u_int8_t);
-typedef void (*bus_mem_write_2_t)(bus_mem_handle_t, bus_mem_size_t, u_int16_t);
-
-void cross_attach_hook(struct device *, struct device *,
- struct isabus_attach_args *);
+typedef int (*bus_mem_unmap_t) __P((bus_mem_handle_t, bus_mem_size_t));
+typedef u_int8_t (*bus_mem_read_1_t) __P((bus_mem_handle_t, bus_mem_size_t));
+typedef u_int16_t (*bus_mem_read_2_t) __P((bus_mem_handle_t, bus_mem_size_t));
+typedef void (*bus_mem_write_1_t) __P((bus_mem_handle_t, bus_mem_size_t,
+ u_int8_t));
+typedef void (*bus_mem_write_2_t) __P((bus_mem_handle_t, bus_mem_size_t,
+ u_int16_t));
+
+int crossintr __P((void *));
+
+void cross_attach_hook __P((struct device *, struct device *,
+ struct isabus_attach_args *));
void *cross_intr_establish __P((void *, int, int, int, int (*)(void *),
void *, char *));
void cross_intr_disestablish __P((void *, void *));
diff --git a/sys/arch/amiga/isa/crossreg.h b/sys/arch/amiga/isa/crossreg.h
index cc932f66dd8..46a0d483b2a 100644
--- a/sys/arch/amiga/isa/crossreg.h
+++ b/sys/arch/amiga/isa/crossreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: crossreg.h,v 1.2 1996/04/27 18:38:56 niklas Exp $ */
+/* $OpenBSD: crossreg.h,v 1.3 1996/06/04 13:40:13 niklas Exp $ */
/*
* Copyright (c) 1994, 1996 Niklas Hallqvist, Carsten Hammer
@@ -108,7 +108,7 @@
#define CROSS_XLP_INTABLE 0
#define CROSS_XLP_LATCH 2
#define CROSS_HANDLE_TO_XLP_LATCH(va) \
- ((volatile u_int16_t *)((va) & 0xffff | CROSS_XLP_LATCH))
+ ((volatile u_int16_t *)(((va) & 0xffff) | CROSS_XLP_LATCH))
#define CROSS_MEMORY_OFFSET (CROSS_XL_MEM - 2 * 0x90000)
#define CROSS_SBHE 0x40
diff --git a/sys/arch/amiga/isa/crossvar.h b/sys/arch/amiga/isa/crossvar.h
index 4d54719a39b..7eb5b792c9c 100644
--- a/sys/arch/amiga/isa/crossvar.h
+++ b/sys/arch/amiga/isa/crossvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: crossvar.h,v 1.2 1996/04/27 18:38:57 niklas Exp $ */
+/* $OpenBSD: crossvar.h,v 1.3 1996/06/04 13:40:14 niklas Exp $ */
/*
* Copyright (c) 1994, 1996 Niklas Hallqvist
@@ -39,7 +39,7 @@
*/
struct intrhand {
struct intrhand *ih_next;
- int (*ih_fun)();
+ int (*ih_fun) __P ((void *));
void *ih_arg;
u_long ih_count;
int ih_irq;
diff --git a/sys/arch/amiga/isa/ggbus.c b/sys/arch/amiga/isa/ggbus.c
index 03f546e88de..970ba20301f 100644
--- a/sys/arch/amiga/isa/ggbus.c
+++ b/sys/arch/amiga/isa/ggbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ggbus.c,v 1.3 1996/04/27 18:38:58 niklas Exp $ */
+/* $OpenBSD: ggbus.c,v 1.4 1996/06/04 13:40:14 niklas Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Niklas Hallqvist
@@ -35,6 +35,7 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
+#include <sys/systm.h>
#include <machine/bus.h>
#include <machine/cpu.h>
@@ -59,46 +60,50 @@ void ggbusattach __P((struct device *, struct device *, void *));
int ggbusmatch __P((struct device *, void *, void *));
int ggbusprint __P((void *, char *));
-int ggbus_io_map(bus_chipset_tag_t, bus_io_addr_t, bus_io_size_t,
- bus_io_handle_t *);
-int ggbus_mem_map(bus_chipset_tag_t, bus_mem_addr_t, bus_mem_size_t, int,
- bus_mem_handle_t *);
+int ggbus_io_map __P((bus_chipset_tag_t, bus_io_addr_t, bus_io_size_t,
+ bus_io_handle_t *));
+int ggbus_mem_map __P((bus_chipset_tag_t, bus_mem_addr_t, bus_mem_size_t,
+ int, bus_mem_handle_t *));
-void ggbus_io_read_multi_1(bus_io_handle_t, bus_io_size_t, u_int8_t *,
- bus_io_size_t);
-void ggbus_io_read_multi_2(bus_io_handle_t, bus_io_size_t, u_int16_t *,
- bus_io_size_t);
+void ggbus_io_read_multi_1 __P((bus_io_handle_t, bus_io_size_t, u_int8_t *,
+ bus_io_size_t));
+void ggbus_io_read_multi_2 __P((bus_io_handle_t, bus_io_size_t, u_int16_t *,
+ bus_io_size_t));
-void ggbus_io_write_multi_1(bus_io_handle_t, bus_io_size_t,
- const u_int8_t *, bus_io_size_t);
-void ggbus_io_write_multi_2(bus_io_handle_t, bus_io_size_t,
- const u_int16_t *, bus_io_size_t);
+void ggbus_io_write_multi_1 __P((bus_io_handle_t, bus_io_size_t,
+ const u_int8_t *, bus_io_size_t));
+void ggbus_io_write_multi_2 __P((bus_io_handle_t, bus_io_size_t,
+ const u_int16_t *, bus_io_size_t));
/*
* Note that the following unified access functions are prototyped for the
* I/O access case. We use casts to get type correctness.
*/
-int ggbus_unmap(bus_io_handle_t, bus_io_size_t);
+int ggbus_unmap __P((bus_io_handle_t, bus_io_size_t));
-__inline u_int8_t ggbus_read_1(bus_io_handle_t, bus_io_size_t);
-__inline u_int16_t ggbus_read_2(bus_io_handle_t, bus_io_size_t);
+__inline u_int8_t ggbus_read_1 __P((bus_io_handle_t, bus_io_size_t));
+__inline u_int16_t ggbus_read_2 __P((bus_io_handle_t, bus_io_size_t));
-__inline void ggbus_write_1(bus_io_handle_t, bus_io_size_t, u_int8_t);
-__inline void ggbus_write_2(bus_io_handle_t, bus_io_size_t, u_int16_t);
+__inline void ggbus_write_1 __P((bus_io_handle_t, bus_io_size_t, u_int8_t));
+__inline void ggbus_write_2 __P((bus_io_handle_t, bus_io_size_t, u_int16_t));
/*
* In order to share the access function implementations for I/O and memory
* access we cast the functions for the memory access case. These typedefs
* make that casting look nicer.
*/
-typedef int (*bus_mem_unmap_t)(bus_mem_handle_t, bus_mem_size_t);
-typedef u_int8_t (*bus_mem_read_1_t)(bus_mem_handle_t, bus_mem_size_t);
-typedef u_int16_t (*bus_mem_read_2_t)(bus_mem_handle_t, bus_mem_size_t);
-typedef void (*bus_mem_write_1_t)(bus_mem_handle_t, bus_mem_size_t, u_int8_t);
-typedef void (*bus_mem_write_2_t)(bus_mem_handle_t, bus_mem_size_t, u_int16_t);
-
-void ggbus_attach_hook(struct device *, struct device *,
- struct isabus_attach_args *);
+typedef int (*bus_mem_unmap_t) __P((bus_mem_handle_t, bus_mem_size_t));
+typedef u_int8_t (*bus_mem_read_1_t) __P((bus_mem_handle_t, bus_mem_size_t));
+typedef u_int16_t (*bus_mem_read_2_t) __P((bus_mem_handle_t, bus_mem_size_t));
+typedef void (*bus_mem_write_1_t) __P((bus_mem_handle_t, bus_mem_size_t,
+ u_int8_t));
+typedef void (*bus_mem_write_2_t) __P((bus_mem_handle_t, bus_mem_size_t,
+ u_int16_t));
+
+int ggbusintr __P((void *));
+
+void ggbus_attach_hook __P((struct device *, struct device *,
+ struct isabus_attach_args *));
void *ggbus_intr_establish __P((void *, int, int, int, int (*)(void *),
void *, char *));
void ggbus_intr_disestablish __P((void *, void *));
diff --git a/sys/arch/amiga/isa/ggbusvar.h b/sys/arch/amiga/isa/ggbusvar.h
index 8bc8525f61a..0d48add4499 100644
--- a/sys/arch/amiga/isa/ggbusvar.h
+++ b/sys/arch/amiga/isa/ggbusvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ggbusvar.h,v 1.2 1996/04/27 18:39:00 niklas Exp $ */
+/* $OpenBSD: ggbusvar.h,v 1.3 1996/06/04 13:40:14 niklas Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Niklas Hallqvist
@@ -39,7 +39,7 @@
*/
struct intrhand {
struct intrhand *ih_next;
- int (*ih_fun)();
+ int (*ih_fun) __P((void *));
void *ih_arg;
u_long ih_count;
int ih_irq;