summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2016-07-27 15:12:37 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2016-07-27 15:12:37 +0000
commitf06d58178bbdb6f1a60e7300dab7672b54f39515 (patch)
treec41434b122b73f2f6102624d889db524629c613f /sys/arch
parent6762d156c509fd21d4f813312c555ba191465d6e (diff)
ansify mem.c to the latest fashion. with a fix from mike burns. ok deraadt
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc/sparc/mem.c35
-rw-r--r--sys/arch/sparc64/sparc64/mem.c27
2 files changed, 11 insertions, 51 deletions
diff --git a/sys/arch/sparc/sparc/mem.c b/sys/arch/sparc/sparc/mem.c
index ef85ed0eae0..fef381de6fc 100644
--- a/sys/arch/sparc/sparc/mem.c
+++ b/sys/arch/sparc/sparc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.25 2015/02/10 22:44:35 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.26 2016/07/27 15:12:36 tedu Exp $ */
/* $NetBSD: mem.c,v 1.13 1996/03/30 21:12:16 christos Exp $ */
/*
@@ -60,12 +60,8 @@ extern vaddr_t prom_vend;
caddr_t zeropage;
vaddr_t mem_page;
-/*ARGSUSED*/
int
-mmopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmopen(dev_t dev, int flag, int mode, struct proc *p)
{
switch (minor(dev)) {
@@ -80,23 +76,15 @@ mmopen(dev, flag, mode, p)
}
}
-/*ARGSUSED*/
int
-mmclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
return (0);
}
-/*ARGSUSED*/
int
-mmrw(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+mmrw(dev_t dev, struct uio *uio, int flags)
{
off_t o;
paddr_t pa;
@@ -175,8 +163,6 @@ mmrw(dev, uio, flags)
uio->uio_resid = 0;
return (0);
-/* XXX should add sbus, etc */
-
#if defined(SUN4)
/* minor device 11 (/dev/eeprom) is the old-style (a'la Sun 3) EEPROM */
case 11:
@@ -215,23 +201,14 @@ unlock:
}
paddr_t
-mmmmap(dev, off, prot)
- dev_t dev;
- off_t off;
- int prot;
+mmmmap(dev_t dev, off_t off, int prot)
{
return (-1);
}
-/*ARGSUSED*/
int
-mmioctl(dev, cmd, data, flags, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
+mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
{
return (EOPNOTSUPP);
}
diff --git a/sys/arch/sparc64/sparc64/mem.c b/sys/arch/sparc64/sparc64/mem.c
index c3c66b598dd..e5af1339214 100644
--- a/sys/arch/sparc64/sparc64/mem.c
+++ b/sys/arch/sparc64/sparc64/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.14 2015/02/10 22:44:35 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.15 2016/07/27 15:12:36 tedu Exp $ */
/* $NetBSD: mem.c,v 1.18 2001/04/24 04:31:12 thorpej Exp $ */
/*
@@ -58,34 +58,22 @@ vaddr_t prom_vstart = 0xf000000;
vaddr_t prom_vend = 0xf0100000;
caddr_t zeropage;
-/*ARGSUSED*/
int
-mmopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmopen(dev_t dev, int flag, int mode, struct proc *p)
{
return (0);
}
-/*ARGSUSED*/
int
-mmclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
return (0);
}
-/*ARGSUSED*/
int
-mmrw(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+mmrw(dev_t dev, struct uio *uio, int flags)
{
vaddr_t o, v;
size_t c;
@@ -158,8 +146,6 @@ mmrw(dev, uio, flags)
uio->uio_resid = 0;
return (0);
-/* XXX should add sbus, etc */
-
/*
* minor device 12 (/dev/zero) is source of nulls on read,
* rathole on write.
@@ -194,10 +180,7 @@ unlock:
}
paddr_t
-mmmmap(dev, off, prot)
- dev_t dev;
- off_t off;
- int prot;
+mmmmap(dev_t dev, off_t off, int prot)
{
return (-1);