Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arc - remove __P()
details: https://anonhg.NetBSD.org/src/rev/4823a14e0a3f
branches: trunk
changeset: 573212:4823a14e0a3f
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Jan 22 07:35:33 2005 +0000
description:
- remove __P()
- use ANSI function decls
- u_intNN_t -> uintNN_t
- some KNF
diffstat:
sys/arch/arc/arc/arc_trap.c | 25 +-
sys/arch/arc/arc/arcbios.c | 84 +++----
sys/arch/arc/arc/arcbios.h | 110 +++++-----
sys/arch/arc/arc/autoconf.c | 24 +-
sys/arch/arc/arc/bus_dma.c | 174 +++++------------
sys/arch/arc/arc/bus_space.c | 129 +++++--------
sys/arch/arc/arc/bus_space_large.c | 60 ++---
sys/arch/arc/arc/bus_space_sparse.c | 52 ++---
sys/arch/arc/arc/c_isa.c | 14 +-
sys/arch/arc/arc/c_jazz_eisa.c | 16 +-
sys/arch/arc/arc/c_magnum.c | 36 +-
sys/arch/arc/arc/c_nec_eisa.c | 26 +-
sys/arch/arc/arc/c_nec_jazz.c | 27 +-
sys/arch/arc/arc/c_nec_pci.c | 23 +-
sys/arch/arc/arc/cpu.c | 18 +-
sys/arch/arc/arc/disksubr.c | 94 ++++-----
sys/arch/arc/arc/machdep.c | 52 ++---
sys/arch/arc/arc/mainbus.c | 59 ++---
sys/arch/arc/arc/minidebug.c | 275 +++++++++++++--------------
sys/arch/arc/arc/p_acer_pica_61.c | 9 +-
sys/arch/arc/arc/p_dti_arcstation.c | 50 ++--
sys/arch/arc/arc/p_dti_tyne.c | 49 ++--
sys/arch/arc/arc/p_ms_jazz.c | 9 +-
sys/arch/arc/arc/p_nec_jc94.c | 9 +-
sys/arch/arc/arc/p_nec_r94.c | 6 +-
sys/arch/arc/arc/p_nec_r96.c | 14 +-
sys/arch/arc/arc/p_sni_rm200pci.c | 16 +-
sys/arch/arc/arc/platform.c | 23 +-
sys/arch/arc/arc/timer.c | 16 +-
sys/arch/arc/arc/timervar.h | 6 +-
sys/arch/arc/arc/todclock.c | 12 +-
sys/arch/arc/arc/wired_map.c | 66 ++----
sys/arch/arc/arc/wired_map.h | 13 +-
sys/arch/arc/dev/opms.c | 78 ++-----
sys/arch/arc/dev/opmsvar.h | 10 +-
sys/arch/arc/dev/pccons.c | 221 +++++++++-------------
sys/arch/arc/dev/pcconsvar.h | 24 +-
sys/arch/arc/dti/btl.c | 140 +++++---------
sys/arch/arc/dti/btlreg.h | 6 +-
sys/arch/arc/dti/btlvar.h | 8 +-
sys/arch/arc/dti/tyneisabr.c | 18 +-
sys/arch/arc/include/autoconf.h | 14 +-
sys/arch/arc/include/bus.h | 343 +++++++++++++++++-----------------
sys/arch/arc/include/cpu.h | 4 +-
sys/arch/arc/include/intr.h | 4 +-
sys/arch/arc/include/param.h | 4 +-
sys/arch/arc/include/pci_machdep.h | 36 +-
sys/arch/arc/include/pio.h | 14 +-
sys/arch/arc/include/platform.h | 45 ++--
sys/arch/arc/include/trap.h | 6 +-
sys/arch/arc/isa/arcsisabr.c | 18 +-
sys/arch/arc/isa/isabus.c | 86 +++-----
sys/arch/arc/isa/isadma.c | 78 +++----
sys/arch/arc/isa/isadma_bounce.c | 41 ++--
sys/arch/arc/isa/isapnp_machdep.c | 16 +-
sys/arch/arc/isa/joy_timer.c | 11 +-
sys/arch/arc/isa/mcclock_isa.c | 36 +--
sys/arch/arc/isa/opms_isa.c | 27 +-
sys/arch/arc/isa/pccons_isa.c | 39 +--
sys/arch/arc/isa/pccons_isavar.h | 4 +-
sys/arch/arc/isa/timer_isa.c | 37 +--
sys/arch/arc/jazz/asc.c | 49 +---
sys/arch/arc/jazz/bus_dma_jazz.c | 152 +++++---------
sys/arch/arc/jazz/com_jazzio.c | 21 +-
sys/arch/arc/jazz/fd.c | 116 +++--------
sys/arch/arc/jazz/fdc_jazzio.c | 26 +-
sys/arch/arc/jazz/if_sn_jazzio.c | 8 +-
sys/arch/arc/jazz/jazzdmatlb.c | 40 +--
sys/arch/arc/jazz/jazzdmatlbreg.h | 6 +-
sys/arch/arc/jazz/jazzdmatlbvar.h | 19 +-
sys/arch/arc/jazz/jazzio.c | 47 +---
sys/arch/arc/jazz/jazziovar.h | 4 +-
sys/arch/arc/jazz/jazzisabr.c | 18 +-
sys/arch/arc/jazz/lpt_jazzio.c | 33 +--
sys/arch/arc/jazz/mcclock_jazzio.c | 20 +-
sys/arch/arc/jazz/oosiop_jazzio.c | 18 +-
sys/arch/arc/jazz/opms_jazzio.c | 23 +-
sys/arch/arc/jazz/osiop_jazzio.c | 29 +-
sys/arch/arc/jazz/pccons_jazzio.c | 48 ++--
sys/arch/arc/jazz/pccons_jazziovar.h | 4 +-
sys/arch/arc/jazz/pckbc_jazzio.c | 28 +-
sys/arch/arc/jazz/timer_jazzio.c | 30 +-
sys/arch/arc/jazz/timer_jazziovar.h | 6 +-
sys/arch/arc/jazz/vga_jazzio.c | 50 ++---
sys/arch/arc/jazz/vga_jazziovar.h | 4 +-
sys/arch/arc/pci/necpb.c | 135 +++++--------
sys/arch/arc/pci/necpbvar.h | 6 +-
87 files changed, 1638 insertions(+), 2266 deletions(-)
diffs (truncated from 9859 to 300 lines):
diff -r 61630bea2e32 -r 4823a14e0a3f sys/arch/arc/arc/arc_trap.c
--- a/sys/arch/arc/arc/arc_trap.c Sat Jan 22 07:33:56 2005 +0000
+++ b/sys/arch/arc/arc/arc_trap.c Sat Jan 22 07:35:33 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arc_trap.c,v 1.27 2003/08/07 16:26:47 agc Exp $ */
+/* $NetBSD: arc_trap.c,v 1.28 2005/01/22 07:35:33 tsutsui Exp $ */
/* $OpenBSD: trap.c,v 1.22 1999/05/24 23:08:59 jason Exp $ */
/*
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arc_trap.c,v 1.27 2003/08/07 16:26:47 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arc_trap.c,v 1.28 2005/01/22 07:35:33 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -95,7 +95,7 @@
#include <arc/jazz/pica.h>
#include <arc/jazz/rd94.h>
-int arc_hardware_intr __P((u_int32_t, u_int32_t, u_int32_t, u_int32_t));
+int arc_hardware_intr(uint32_t, uint32_t, uint32_t, uint32_t);
#define MIPS_INT_LEVELS 8
@@ -107,11 +107,8 @@
int cpu_int_mask; /* External cpu interrupt mask */
int
-arc_hardware_intr(status, cause, pc, ipending)
- u_int32_t status;
- u_int32_t cause;
- u_int32_t pc;
- u_int32_t ipending;
+arc_hardware_intr(uint32_t status, uint32_t cause, uint32_t pc,
+ uint32_t ipending)
{
int i;
struct clockframe cf;
@@ -140,11 +137,9 @@
* Events are checked in priority order.
*/
void
-arc_set_intr(mask, int_hand, prio)
- int mask;
- int (*int_hand)(u_int, struct clockframe *);
- int prio;
+arc_set_intr(int mask, int (*int_hand)(u_int, struct clockframe *), int prio)
{
+
if (prio > MIPS_INT_LEVELS)
panic("set_intr: to high priority");
@@ -164,11 +159,7 @@
* N.B., curlwp might be NULL.
*/
void
-cpu_intr(status, cause, pc, ipending)
- u_int32_t status;
- u_int32_t cause;
- u_int32_t pc;
- u_int32_t ipending; /* pending interrupts & enable mask */
+cpu_intr(uint32_t status, uint32_t cause, uint32_t pc, uint32_t ipending)
{
if (ipending & MIPS_INT_MASK_CLOCK) {
diff -r 61630bea2e32 -r 4823a14e0a3f sys/arch/arc/arc/arcbios.c
--- a/sys/arch/arc/arc/arcbios.c Sat Jan 22 07:33:56 2005 +0000
+++ b/sys/arch/arc/arc/arcbios.c Sat Jan 22 07:35:33 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arcbios.c,v 1.12 2003/07/15 00:04:39 lukem Exp $ */
+/* $NetBSD: arcbios.c,v 1.13 2005/01/22 07:35:33 tsutsui Exp $ */
/* $OpenBSD: arcbios.c,v 1.3 1998/06/06 06:33:33 mickey Exp $ */
/*-
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.12 2003/07/15 00:04:39 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.13 2005/01/22 07:35:33 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -43,19 +43,19 @@
#include <machine/cpu.h>
#include <arc/arc/arcbios.h>
-int Bios_Read __P((int, char *, int, int *));
-int Bios_Write __P((int, char *, int, int *));
-int Bios_Open __P((char *, int, u_int *));
-int Bios_Close __P((u_int));
-arc_mem_t *Bios_GetMemoryDescriptor __P((arc_mem_t *));
-arc_sid_t *Bios_GetSystemId __P((void));
-arc_config_t *Bios_GetChild __P((arc_config_t *));
-arc_config_t *Bios_GetPeer __P((arc_config_t *));
-arc_dsp_stat_t *Bios_GetDisplayStatus __P((int));
+int Bios_Read(int, char *, int, int *);
+int Bios_Write(int, char *, int, int *);
+int Bios_Open(char *, int, u_int *);
+int Bios_Close(u_int);
+arc_mem_t *Bios_GetMemoryDescriptor(arc_mem_t *);
+arc_sid_t *Bios_GetSystemId(void);
+arc_config_t *Bios_GetChild(arc_config_t *);
+arc_config_t *Bios_GetPeer(arc_config_t *);
+arc_dsp_stat_t *Bios_GetDisplayStatus(int);
-static void bios_config_id_copy __P((arc_config_t *, char *, size_t));
-static void bios_config_component __P((arc_config_t *));
-static void bios_config_subtree __P((arc_config_t *));
+static void bios_config_id_copy(arc_config_t *, char *, size_t);
+static void bios_config_component(arc_config_t *);
+static void bios_config_subtree(arc_config_t *);
char arc_vendor_id[sizeof(((arc_sid_t *)0)->vendor) + 1];
unsigned char arc_product_id[sizeof(((arc_sid_t *)0)->prodid)];
@@ -129,8 +129,8 @@
* BIOS based console, for early stage.
*/
-int biosgetc __P((dev_t));
-void biosputc __P((dev_t, int));
+int biosgetc(dev_t);
+void biosputc(dev_t, int);
/* this is to fake out the console routines, while booting. */
struct consdev bioscons = {
@@ -139,21 +139,18 @@
};
int
-biosgetc(dev)
- dev_t dev;
+biosgetc(dev_t dev)
{
int cnt;
char buf;
if (Bios_Read(0, &buf, 1, &cnt) != arc_ESUCCESS)
- return (-1);
- return (buf & 255);
+ return -1;
+ return buf & 255;
}
void
-biosputc(dev, ch)
- dev_t dev;
- int ch;
+biosputc(dev_t dev, int ch)
{
int cnt;
char buf;
@@ -163,7 +160,7 @@
}
void
-bios_init_console()
+bios_init_console(void)
{
static int initialized = 0;
@@ -182,10 +179,8 @@
* Concatenate obvious adjecent segments.
*/
int
-bios_configure_memory(mem_reserved, mem_clusters, mem_cluster_cnt_return)
- int *mem_reserved;
- phys_ram_seg_t *mem_clusters;
- int *mem_cluster_cnt_return;
+bios_configure_memory(int *mem_reserved, phys_ram_seg_t *mem_clusters,
+ int *mem_cluster_cnt_return)
{
int physmem = 0; /* Total physical memory size */
int mem_cluster_cnt = 0;
@@ -265,18 +260,18 @@
#endif
*mem_cluster_cnt_return = mem_cluster_cnt;
- return (physmem);
+ return physmem;
}
/*
* ARC Firmware present?
*/
int
-bios_ident()
+bios_ident(void)
{
- return (
- (ArcBiosBase->magic == ARC_PARAM_BLK_MAGIC) ||
- (ArcBiosBase->magic == ARC_PARAM_BLK_MAGIC_BUG));
+
+ return (ArcBiosBase->magic == ARC_PARAM_BLK_MAGIC) ||
+ (ArcBiosBase->magic == ARC_PARAM_BLK_MAGIC_BUG);
}
/*
@@ -284,11 +279,9 @@
*/
static void
-bios_config_id_copy(cf, string, size)
- arc_config_t *cf;
- char *string;
- size_t size;
+bios_config_id_copy(arc_config_t *cf, char *string, size_t size)
{
+
size--;
if (size > cf->id_len)
size = cf->id_len;
@@ -297,9 +290,9 @@
}
static void
-bios_config_component(cf)
- arc_config_t *cf;
+bios_config_component(arc_config_t *cf)
{
+
switch (cf->class) {
case arc_SystemClass:
if (cf->type == arc_System)
@@ -321,9 +314,9 @@
}
static
-void bios_config_subtree(cf)
- arc_config_t *cf;
+void bios_config_subtree(arc_config_t *cf)
{
+
for (cf = Bios_GetChild(cf); cf != NULL; cf = Bios_GetPeer(cf)) {
bios_config_component(cf);
bios_config_subtree(cf);
@@ -331,7 +324,7 @@
}
void
-bios_save_info()
+bios_save_info(void)
{
arc_sid_t *sid;
@@ -355,12 +348,9 @@
* display configuration.
*/
void
-bios_display_info(xpos, ypos, xsize, ysize)
- int *xpos;
- int *ypos;
- int *xsize;
- int *ysize;
+bios_display_info(int *xpos, int *ypos, int *xsize, int *ysize)
{
+
*xpos = arc_displayinfo.CursorXPosition;
*ypos = arc_displayinfo.CursorYPosition;
*xsize = arc_displayinfo.CursorMaxXPosition;
diff -r 61630bea2e32 -r 4823a14e0a3f sys/arch/arc/arc/arcbios.h
--- a/sys/arch/arc/arc/arcbios.h Sat Jan 22 07:33:56 2005 +0000
+++ b/sys/arch/arc/arc/arcbios.h Sat Jan 22 07:35:33 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arcbios.h,v 1.5 2003/01/19 10:06:12 tsutsui Exp $ */
+/* $NetBSD: arcbios.h,v 1.6 2005/01/22 07:35:33 tsutsui Exp $ */
/* $OpenBSD: arcbios.h,v 1.1 1998/01/29 15:06:22 pefo Exp $ */
/*-
@@ -104,12 +104,12 @@
arc_config_class_t class; /* Likely these three all */
arc_config_type_t type; /* need to be uchar to make */
arc_dev_flags_t flags; /* the alignment right */
- u_int16_t version;
- u_int16_t revision;
- u_int32_t key;
- u_int32_t affinity_mask;
- u_int32_t config_data_len;
- u_int32_t id_len;
+ uint16_t version;
+ uint16_t revision;
+ uint32_t key;
+ uint32_t affinity_mask;
+ uint32_t config_data_len;
+ uint32_t id_len;
char *id;
} arc_config_t;
@@ -166,17 +166,17 @@
typedef struct arc_mem {
MEMORYTYPE Type; /* Memory chunk type */
- u_int32_t BasePage; /* Page no, first page */
- u_int32_t PageCount; /* Number of pages */
+ uint32_t BasePage; /* Page no, first page */
+ uint32_t PageCount; /* Number of pages */
} arc_mem_t;
Home |
Main Index |
Thread Index |
Old Index