From: tedu Date: Mon, 1 Aug 2016 15:58:22 +0000 (+0000) Subject: bring the light of ansi to a few more files X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8aecc5708c303f15af60c3afbff209d9a1aa7ed7;p=openbsd bring the light of ansi to a few more files --- diff --git a/sys/arch/alpha/alpha/mem.c b/sys/arch/alpha/alpha/mem.c index fa46e8712bd..1b24e14e9f3 100644 --- a/sys/arch/alpha/alpha/mem.c +++ b/sys/arch/alpha/alpha/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.28 2015/05/28 20:53:05 jcs Exp $ */ +/* $OpenBSD: mem.c,v 1.29 2016/08/01 15:58:22 tedu Exp $ */ /* $NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $ */ /* @@ -67,12 +67,8 @@ static int ap_open_count = 0; extern int allowaperture; #endif -/*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)) { @@ -99,12 +95,8 @@ 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) { #ifdef APERTURE @@ -114,12 +106,8 @@ mmclose(dev, flag, mode, 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; @@ -210,10 +198,7 @@ kmemphys: } paddr_t -mmmmap(dev, off, prot) - dev_t dev; - off_t off; - int prot; +mmmmap(dev_t dev, off_t off, int prot) { switch (minor(dev)) { case 0: @@ -251,12 +236,7 @@ mmmmap(dev, off, prot) } 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/arm/arm/mem.c b/sys/arch/arm/arm/mem.c index 975ebdc9a99..1834380b385 100644 --- a/sys/arch/arm/arm/mem.c +++ b/sys/arch/arm/arm/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.14 2015/05/28 20:53:05 jcs Exp $ */ +/* $OpenBSD: mem.c,v 1.15 2016/08/01 15:58:22 tedu Exp $ */ /* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */ /* @@ -98,12 +98,8 @@ extern int allowaperture; #endif -/*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)) { case 0: @@ -129,12 +125,8 @@ mmopen(dev, flag, mode, 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) { #ifdef APERTURE if (minor(dev) == 4) @@ -147,12 +139,8 @@ mmclose(dev, flag, mode, p) #define DEV_NULL 2 #define DEV_ZERO 12 -/*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; @@ -237,10 +225,7 @@ mmrw(dev, uio, flags) } paddr_t -mmmmap(dev, off, prot) - dev_t dev; - off_t off; - int prot; +mmmmap(dev_t dev, off_t off, int prot) { struct proc *p = curproc; /* XXX */ @@ -262,10 +247,9 @@ mmmmap(dev, off, prot) return -1; return off; } -/*ARGSUSED*/ + int mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { return (EOPNOTSUPP); } - diff --git a/sys/arch/hppa/dev/mem.c b/sys/arch/hppa/dev/mem.c index b8c11d1a998..5e41d8fe050 100644 --- a/sys/arch/hppa/dev/mem.c +++ b/sys/arch/hppa/dev/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.36 2015/02/10 22:44:35 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.37 2016/08/01 15:58:22 tedu Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -156,12 +156,9 @@ struct cfdriver mem_cd = { caddr_t zeropage; int -memmatch(parent, cfdata, aux) - struct device *parent; - void *cfdata; - void *aux; +memmatch(struct device *parent, void *cfdata, void *aux) { - register struct confargs *ca = aux; + struct confargs *ca = aux; if (ca->ca_type.iodc_type != HPPA_TYPE_MEMORY || ca->ca_type.iodc_sv_model != HPPA_MEMORY_PDEP) @@ -171,10 +168,7 @@ memmatch(parent, cfdata, aux) } void -memattach(parent, self, aux) - struct device *parent; - struct device *self; - void *aux; +memattach(struct device *parent, struct device *self, void *aux) { struct pdc_iodc_minit pdc_minit PDC_ALIGNMENT; struct mem_softc *sc = (struct mem_softc *)self; @@ -275,10 +269,9 @@ memattach(parent, self, aux) } void -viper_setintrwnd(mask) - u_int32_t mask; +viper_setintrwnd(u_int32_t mask) { - register struct mem_softc *sc; + struct mem_softc *sc; sc = mem_cd.cd_devs[0]; @@ -287,7 +280,7 @@ viper_setintrwnd(mask) } void -viper_eisa_en() +viper_eisa_en(void) { struct mem_softc *sc; @@ -307,30 +300,19 @@ viper_eisa_en() } int -mmopen(dev, flag, ioflag, p) - dev_t dev; - int flag; - int ioflag; - struct proc *p; +mmopen(dev_t dev, int flag, int ioflag, 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); } int -mmrw(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; +mmrw(dev_t dev, struct uio *uio, int flags) { struct iovec *iov; vaddr_t v, o; @@ -406,10 +388,7 @@ mmrw(dev, uio, flags) } paddr_t -mmmmap(dev, off, prot) - dev_t dev; - off_t off; - int prot; +mmmmap(dev_t dev, off_t off, int prot) { if (minor(dev) != 0) return (-1); @@ -426,12 +405,7 @@ mmmmap(dev, off, prot) } 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/m88k/m88k/mem.c b/sys/arch/m88k/m88k/mem.c index 1fd9d35d9fe..ff057b58b04 100644 --- a/sys/arch/m88k/m88k/mem.c +++ b/sys/arch/m88k/m88k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.3 2015/02/10 22:44:35 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.4 2016/08/01 15:58:22 tedu Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -55,12 +55,8 @@ extern vaddr_t first_addr, last_addr; extern caddr_t kernelstart; extern void *etext; -/*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)) { @@ -74,23 +70,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) { vaddr_t v; size_t c; @@ -108,13 +96,13 @@ mmrw(dev, uio, flags) } switch (minor(dev)) { -/* minor device 0 is physical memory */ + /* minor device 0 is physical memory */ case 0: v = uio->uio_offset; error = uiomove((caddr_t)v, uio->uio_resid, uio); continue; -/* minor device 1 is kernel memory */ + /* minor device 1 is kernel memory */ case 1: v = uio->uio_offset; c = ulmin(iov->iov_len, MAXPHYS); @@ -129,13 +117,13 @@ mmrw(dev, uio, flags) error = uiomove((caddr_t)v, c, uio); continue; -/* minor device 2 is EOF/RATHOLE */ + /* minor device 2 is /dev/null */ case 2: if (uio->uio_rw == UIO_WRITE) uio->uio_resid = 0; return (0); -/* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */ + /* minor device 12 is /dev/zero */ case 12: if (uio->uio_rw == UIO_WRITE) { c = iov->iov_len; @@ -163,22 +151,13 @@ mmrw(dev, uio, flags) } 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/mips64/mips64/mem.c b/sys/arch/mips64/mips64/mem.c index 4b3eb69d383..bab2383934a 100644 --- a/sys/arch/mips64/mips64/mem.c +++ b/sys/arch/mips64/mips64/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.20 2015/02/10 22:44:35 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.21 2016/08/01 15:58:22 tedu Exp $ */ /* $NetBSD: mem.c,v 1.6 1995/04/10 11:55:03 mycroft Exp $ */ /* @@ -68,7 +68,6 @@ caddr_t zeropage; #define mmwrite mmrw cdev_decl(mm); -/*ARGSUSED*/ int mmopen(dev_t dev, int flag, int mode, struct proc *p) { @@ -84,14 +83,12 @@ mmopen(dev_t dev, int flag, int mode, struct proc *p) } } -/*ARGSUSED*/ int mmclose(dev_t dev, int flag, int mode, struct proc *p) { return (0); } -/*ARGSUSED*/ int mmrw(dev_t dev, struct uio *uio, int flags) { @@ -112,7 +109,7 @@ mmrw(dev_t dev, struct uio *uio, int flags) } switch (minor(dev)) { -/* minor device 0 is physical memory */ + /* minor device 0 is physical memory */ case 0: v = uio->uio_offset; c = iov->iov_len; @@ -122,7 +119,7 @@ mmrw(dev_t dev, struct uio *uio, int flags) error = uiomove((caddr_t)v, c, uio); continue; -/* minor device 1 is kernel memory */ + /* minor device 1 is kernel memory */ case 1: v = uio->uio_offset; c = ulmin(iov->iov_len, MAXPHYS); @@ -153,13 +150,13 @@ mmrw(dev_t dev, struct uio *uio, int flags) return (EFAULT); } -/* minor device 2 is EOF/RATHOLE */ + /* minor device 2 is /dev/null */ case 2: if (uio->uio_rw == UIO_WRITE) uio->uio_resid = 0; return (0); -/* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */ + /* minor device 12 is /dev/zero */ case 12: if (uio->uio_rw == UIO_WRITE) { c = iov->iov_len; @@ -185,7 +182,6 @@ mmrw(dev_t dev, struct uio *uio, int flags) return error; } -/*ARGSUSED*/ paddr_t mmmmap(dev_t dev, off_t off, int prot) {