summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasper <jasper@openbsd.org>2007-06-17 21:20:47 +0000
committerjasper <jasper@openbsd.org>2007-06-17 21:20:47 +0000
commit30becc1361ccd6b57df29b605250f5b6e80fc593 (patch)
treec2527de35e2f870919e0b5f332978e324be953a5
parentadd back missing bcopy & break, got lost when removing arcnet. (diff)
downloadwireguard-openbsd-30becc1361ccd6b57df29b605250f5b6e80fc593.tar.xz
wireguard-openbsd-30becc1361ccd6b57df29b605250f5b6e80fc593.zip
ansify/de-register
ok miod@
-rw-r--r--sys/dev/dec/if_le_dec.c20
-rw-r--r--sys/dev/isa/if_le.c13
-rw-r--r--sys/dev/isa/if_le_isa.c38
-rw-r--r--sys/dev/isa/if_le_isapnp.c14
-rw-r--r--sys/dev/isa/if_levar.h8
-rw-r--r--sys/dev/rnd.c85
-rw-r--r--sys/dev/tc/if_le_ioasic.c40
-rw-r--r--sys/dev/tc/if_le_tc.c10
8 files changed, 73 insertions, 155 deletions
diff --git a/sys/dev/dec/if_le_dec.c b/sys/dev/dec/if_le_dec.c
index 265fca2f7e0..b16ebfe4908 100644
--- a/sys/dev/dec/if_le_dec.c
+++ b/sys/dev/dec/if_le_dec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_dec.c,v 1.2 2003/06/02 23:28:01 millert Exp $ */
+/* $OpenBSD: if_le_dec.c,v 1.3 2007/06/17 21:20:47 jasper Exp $ */
/* $NetBSD: if_le_dec.c,v 1.12 2001/11/13 12:49:45 lukem Exp $ */
/*-
@@ -69,9 +69,7 @@ void le_dec_wrcsr(struct am7990_softc *, u_int16_t, u_int16_t);
u_int16_t le_dec_rdcsr(struct am7990_softc *, u_int16_t);
void
-dec_le_common_attach(sc, eap)
- struct am7990_softc *sc;
- u_char *eap;
+dec_le_common_attach(struct am7990_softc *sc, u_char *eap)
{
int i;
@@ -95,9 +93,7 @@ dec_le_common_attach(sc, eap)
}
void
-le_dec_wrcsr(sc, port, val)
- struct am7990_softc *sc;
- u_int16_t port, val;
+le_dec_wrcsr(struct am7990_softc *sc, u_int16_t port, u_ int16_t val)
{
struct lereg1 *ler1 = ((struct le_softc *)sc)->sc_r1;
@@ -106,9 +102,7 @@ le_dec_wrcsr(sc, port, val)
}
u_int16_t
-le_dec_rdcsr(sc, port)
- struct am7990_softc *sc;
- u_int16_t port;
+le_dec_rdcsr(struct am7990_softc *sc, u_int16_t port)
{
struct lereg1 *ler1 = ((struct le_softc *)sc)->sc_r1;
u_int16_t val;
@@ -124,11 +118,9 @@ le_dec_rdcsr(sc, port)
* pokey sometimes.
*/
void
-le_dec_writereg(regptr, val)
- register volatile u_short *regptr;
- register u_short val;
+le_dec_writereg(volatile u_short *regptr, u_short val)
{
- register int i = 0;
+ int i = 0;
while (*regptr != val) {
*regptr = val;
diff --git a/sys/dev/isa/if_le.c b/sys/dev/isa/if_le.c
index 36c830fd9c5..ca01cb2266e 100644
--- a/sys/dev/isa/if_le.c
+++ b/sys/dev/isa/if_le.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le.c,v 1.17 2004/01/09 21:32:24 brad Exp $ */
+/* $OpenBSD: if_le.c,v 1.18 2007/06/17 21:20:47 jasper Exp $ */
/* $NetBSD: if_le_isa.c,v 1.2 1996/05/12 23:52:56 mycroft Exp $ */
/*-
@@ -67,9 +67,7 @@
#include <dev/isa/if_levar.h>
void
-le_isa_wrcsr(sc, port, val)
- struct am7990_softc *sc;
- u_int16_t port, val;
+le_isa_wrcsr(struct am7990_softc *sc, u_int16_t port, u_int16_t val)
{
struct le_softc *lesc = (struct le_softc *)sc;
bus_space_tag_t iot = lesc->sc_iot;
@@ -80,9 +78,7 @@ le_isa_wrcsr(sc, port, val)
}
u_int16_t
-le_isa_rdcsr(sc, port)
- struct am7990_softc *sc;
- u_int16_t port;
+le_isa_rdcsr(struct am7990_softc *sc, u_int16_t port)
{
struct le_softc *lesc = (struct le_softc *)sc;
bus_space_tag_t iot = lesc->sc_iot;
@@ -99,8 +95,7 @@ le_isa_rdcsr(sc, port)
* Controller interrupt.
*/
int
-le_isa_intredge(arg)
- void *arg;
+le_isa_intredge(void *arg)
{
if (am7990_intr(arg) == 0)
diff --git a/sys/dev/isa/if_le_isa.c b/sys/dev/isa/if_le_isa.c
index aca424a2aab..14ff40f7f14 100644
--- a/sys/dev/isa/if_le_isa.c
+++ b/sys/dev/isa/if_le_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_isa.c,v 1.18 2004/01/09 21:32:24 brad Exp $ */
+/* $OpenBSD: if_le_isa.c,v 1.19 2007/06/17 21:20:47 jasper Exp $ */
/* $NetBSD: if_le_isa.c,v 1.2 1996/05/12 23:52:56 mycroft Exp $ */
/*-
@@ -69,22 +69,20 @@
static char *card_type[] =
{ "unknown", "BICC Isolan", "NE2100", "DEPCA", "PCnet-ISA" };
-int le_isa_probe(struct device *, void *, void *);
-void le_isa_attach(struct device *, struct device *, void *);
+int le_isa_probe(struct device *, void *, void *);
+void le_isa_attach(struct device *, struct device *, void *);
struct cfattach le_isa_ca = {
sizeof(struct le_softc), le_isa_probe, le_isa_attach
};
-int depca_isa_probe(struct le_softc *, struct isa_attach_args *);
-int ne2100_isa_probe(struct le_softc *, struct isa_attach_args *);
-int bicc_isa_probe(struct le_softc *, struct isa_attach_args *);
-int lance_isa_probe(struct am7990_softc *);
+int depca_isa_probe(struct le_softc *, struct isa_attach_args *);
+int ne2100_isa_probe(struct le_softc *, struct isa_attach_args *);
+int bicc_isa_probe(struct le_softc *, struct isa_attach_args *);
+int lance_isa_probe(struct am7990_softc *);
int
-le_isa_probe(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+le_isa_probe(struct device *parent, void *match, void *aux)
{
struct le_softc *lesc = match;
struct isa_attach_args *ia = aux;
@@ -109,9 +107,7 @@ le_isa_probe(parent, match, aux)
}
int
-depca_isa_probe(lesc, ia)
- struct le_softc *lesc;
- struct isa_attach_args *ia;
+depca_isa_probe(struct le_softc *lesc, struct isa_attach_args *ia)
{
struct am7990_softc *sc = &lesc->sc_am7990;
bus_space_tag_t iot = lesc->sc_iot;
@@ -213,9 +209,7 @@ found:
}
int
-ne2100_isa_probe(lesc, ia)
- struct le_softc *lesc;
- struct isa_attach_args *ia;
+ne2100_isa_probe(struct le_softc *lesc, struct isa_attach_args *ia)
{
struct am7990_softc *sc = &lesc->sc_am7990;
bus_space_tag_t iot = lesc->sc_iot;
@@ -248,9 +242,7 @@ ne2100_isa_probe(lesc, ia)
}
int
-bicc_isa_probe(lesc, ia)
- struct le_softc *lesc;
- struct isa_attach_args *ia;
+bicc_isa_probe(struct le_softc *lesc, struct isa_attach_args *ia)
{
struct am7990_softc *sc = &lesc->sc_am7990;
bus_space_handle_t ioh;
@@ -286,8 +278,7 @@ bicc_isa_probe(lesc, ia)
* Determine which chip is present on the card.
*/
int
-lance_isa_probe(sc)
- struct am7990_softc *sc;
+lance_isa_probe(struct am7990_softc *sc)
{
/* Stop the LANCE chip and put it in a known state. */
@@ -302,9 +293,8 @@ lance_isa_probe(sc)
}
void
-le_isa_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+le_isa_attach(struct device *parent, struct device *self,
+ void *aux)
{
struct le_softc *lesc = (void *)self;
struct am7990_softc *sc = &lesc->sc_am7990;
diff --git a/sys/dev/isa/if_le_isapnp.c b/sys/dev/isa/if_le_isapnp.c
index 05c7f7ce2c3..2defed5b878 100644
--- a/sys/dev/isa/if_le_isapnp.c
+++ b/sys/dev/isa/if_le_isapnp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_isapnp.c,v 1.11 2004/01/09 21:32:24 brad Exp $ */
+/* $OpenBSD: if_le_isapnp.c,v 1.12 2007/06/17 21:20:47 jasper Exp $ */
/* $NetBSD: if_le_isa.c,v 1.2 1996/05/12 23:52:56 mycroft Exp $ */
/*-
@@ -66,25 +66,21 @@
#include <dev/isa/if_levar.h>
-int le_isapnp_match(struct device *, void *, void *);
-void le_isapnp_attach(struct device *, struct device *, void *);
+int le_isapnp_match(struct device *, void *, void *);
+void le_isapnp_attach(struct device *, struct device *, void *);
struct cfattach le_isapnp_ca = {
sizeof(struct le_softc), le_isapnp_match, le_isapnp_attach
};
int
-le_isapnp_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+le_isapnp_match(struct device *parent, void *match, void *aux)
{
return 1;
}
void
-le_isapnp_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+le_isapnp_attach(struct device *parent, struct device *self, void *aux)
{
struct le_softc *lesc = (void *)self;
struct isa_attach_args *ia = aux;
diff --git a/sys/dev/isa/if_levar.h b/sys/dev/isa/if_levar.h
index 0c5aef5d8e1..8027ebf72ba 100644
--- a/sys/dev/isa/if_levar.h
+++ b/sys/dev/isa/if_levar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_levar.h,v 1.8 2002/03/14 01:26:56 millert Exp $ */
+/* $OpenBSD: if_levar.h,v 1.9 2007/06/17 21:20:47 jasper Exp $ */
/* $NetBSD: if_levar.h,v 1.5 1996/05/07 01:50:07 thorpej Exp $ */
/*
@@ -55,6 +55,6 @@ struct le_softc {
bus_space_handle_t sc_ioh;
};
-void le_isa_wrcsr(struct am7990_softc *, u_int16_t, u_int16_t);
-u_int16_t le_isa_rdcsr(struct am7990_softc *, u_int16_t);
-int le_isa_intredge(void *);
+void le_isa_wrcsr(struct am7990_softc *, u_int16_t, u_int16_t);
+u_int16_t le_isa_rdcsr(struct am7990_softc *, u_int16_t);
+int le_isa_intredge(void *);
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c
index b9ad5ad11f0..703c58736d4 100644
--- a/sys/dev/rnd.c
+++ b/sys/dev/rnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rnd.c,v 1.81 2007/04/10 17:47:55 miod Exp $ */
+/* $OpenBSD: rnd.c,v 1.82 2007/06/17 21:22:04 jasper Exp $ */
/*
* rnd.c -- A strong random number generator
@@ -472,7 +472,7 @@ rnd_qlen(void)
void dequeue_randomness(void *);
static void add_entropy_words(const u_int32_t *, u_int n);
-void extract_entropy(register u_int8_t *, int);
+void extract_entropy(u_int8_t *, int);
static u_int8_t arc4_getbyte(void);
void arc4_stir(void);
@@ -500,7 +500,7 @@ void arc4maybeinit(void);
static u_int8_t
arc4_getbyte(void)
{
- register u_int8_t si, sj, ret;
+ u_int8_t si, sj, ret;
int s;
s = splhigh();
@@ -521,8 +521,8 @@ void
arc4_stir(void)
{
u_int8_t buf[256];
- register u_int8_t si;
- register int n, s;
+ u_int8_t si;
+ int n, s;
int len;
nanotime((struct timespec *) buf);
@@ -579,8 +579,7 @@ arc4maybeinit(void)
* actual stirring happens on any access attempt.
*/
void
-arc4_reinit(v)
- void *v;
+arc4_reinit(void *v)
{
arc4random_initialized = 0;
}
@@ -636,21 +635,13 @@ randomattach(void)
}
int
-randomopen(dev, flag, mode, p)
- dev_t dev;
- int flag;
- int mode;
- struct proc *p;
+randomopen(dev_t dev, int flag, int mode, struct proc *p)
{
return (minor (dev) < RND_NODEV) ? 0 : ENXIO;
}
int
-randomclose(dev, flag, mode, p)
- dev_t dev;
- int flag;
- int mode;
- struct proc *p;
+randomclose(dev_t dev, int flag, int mode, struct proc *p)
{
return 0;
}
@@ -670,9 +661,7 @@ randomclose(dev, flag, mode, p)
* get affected. --- TYT, 10/11/95
*/
static void
-add_entropy_words(buf, n)
- const u_int32_t *buf;
- u_int n;
+add_entropy_words(const u_int32_t *buf, u_int n)
{
static const u_int32_t twist_table[8] = {
0x00000000, 0x3b6e20c8, 0x76dc4190, 0x4db26158,
@@ -680,8 +669,8 @@ add_entropy_words(buf, n)
};
for (; n--; buf++) {
- register u_int32_t w = roll(*buf, random_state.input_rotate);
- register u_int i = random_state.add_ptr =
+ u_int32_t w = roll(*buf, random_state.input_rotate);
+ u_int i = random_state.add_ptr =
(random_state.add_ptr - 1) & (POOLWORDS - 1);
/*
* Normally, we add 7 bits of rotation to the pool.
@@ -716,11 +705,10 @@ add_entropy_words(buf, n)
*
*/
void
-enqueue_randomness(state, val)
- int state, val;
+enqueue_randomness(int state, int val)
{
- register struct timer_rand_state *p;
- register struct rand_event *rep;
+ struct timer_rand_state *p;
+ struct rand_event *rep;
struct timespec tv;
u_int time, nbits;
int s;
@@ -747,7 +735,7 @@ enqueue_randomness(state, val)
* deltas in order to make our estimate.
*/
if (!p->dont_count_entropy) {
- register int delta, delta2, delta3;
+ int delta, delta2, delta3;
delta = time - p->last_time;
delta2 = delta - p->last_delta;
delta3 = delta2 - p->last_delta2;
@@ -825,11 +813,10 @@ enqueue_randomness(state, val)
}
void
-dequeue_randomness(v)
- void *v;
+dequeue_randomness(void *v)
{
struct random_bucket *rs = v;
- register struct rand_event *rep;
+ struct rand_event *rep;
u_int32_t buf[2];
u_int nbits;
int s;
@@ -883,9 +870,7 @@ dequeue_randomness(v)
* number of bytes that are actually obtained.
*/
void
-extract_entropy(buf, nbytes)
- register u_int8_t *buf;
- int nbytes;
+extract_entropy(u_int8_t *buf, int nbytes)
{
struct random_bucket *rs = &random_state;
u_char buffer[16];
@@ -946,19 +931,14 @@ extract_entropy(buf, nbytes)
* numbers, etc.
*/
void
-get_random_bytes(buf, nbytes)
- void *buf;
- size_t nbytes;
+get_random_bytes(void *buf, size_t nbytes)
{
extract_entropy((u_int8_t *) buf, nbytes);
rndstats.rnd_used += nbytes * 8;
}
int
-randomread(dev, uio, ioflag)
- dev_t dev;
- struct uio *uio;
- int ioflag;
+randomread(dev_t dev, struct uio *uio, int ioflag)
{
int ret = 0;
int i;
@@ -1038,10 +1018,7 @@ randomread(dev, uio, ioflag)
}
int
-randompoll(dev, events, p)
- dev_t dev;
- int events;
- struct proc *p;
+randompoll(dev_t dev, int events, struct proc *p)
{
int revents;
@@ -1093,9 +1070,7 @@ filt_rndrdetach(struct knote *kn)
}
int
-filt_rndread(kn, hint)
- struct knote *kn;
- long hint;
+filt_rndread(struct knote *kn, long hint)
{
struct random_bucket *rs = (struct random_bucket *)kn->kn_hook;
@@ -1113,18 +1088,13 @@ filt_rndwdetach(struct knote *kn)
}
int
-filt_rndwrite(kn, hint)
- struct knote *kn;
- long hint;
+filt_rndwrite(struct knote *kn, long hint)
{
return (1);
}
int
-randomwrite(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+randomwrite(dev_t dev, struct uio *uio, int flags)
{
int ret = 0;
u_int32_t *buf;
@@ -1156,12 +1126,7 @@ randomwrite(dev, uio, flags)
}
int
-randomioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+randomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
int s, ret = 0;
u_int cnt;
diff --git a/sys/dev/tc/if_le_ioasic.c b/sys/dev/tc/if_le_ioasic.c
index 9eab3788dc2..acaa953477e 100644
--- a/sys/dev/tc/if_le_ioasic.c
+++ b/sys/dev/tc/if_le_ioasic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_ioasic.c,v 1.11 2002/05/02 22:56:06 miod Exp $ */
+/* $OpenBSD: if_le_ioasic.c,v 1.12 2007/06/17 21:20:47 jasper Exp $ */
/* $NetBSD: if_le_ioasic.c,v 1.18 2001/11/13 06:26:10 lukem Exp $ */
/*
@@ -82,9 +82,7 @@ void le_ioasic_copyfrombuf_gap16(struct am7990_softc *, void *,
void le_ioasic_zerobuf_gap16(struct am7990_softc *, int, int);
int
-le_ioasic_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+le_ioasic_match(struct device parent, void *match, void *aux)
{
struct ioasicdev_attach_args *d = aux;
@@ -99,9 +97,7 @@ le_ioasic_match(parent, match, aux)
#define LE_IOASIC_MEMALIGN (128*1024)
void
-le_ioasic_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+le_ioasic_attach(struct device *parent, struct device *self, void *aux)
{
struct le_ioasic_softc *sc = (void *)self;
struct ioasicdev_attach_args *d = aux;
@@ -189,11 +185,8 @@ le_ioasic_attach(parent, self, aux)
*/
void
-le_ioasic_copytobuf_gap2(sc, fromv, boff, len)
- struct am7990_softc *sc;
- void *fromv;
- int boff;
- int len;
+le_ioasic_copytobuf_gap2(struct am7990_softc *sc, void *fromv,
+ int boff, int len)
{
volatile caddr_t buf = sc->sc_mem;
caddr_t from = fromv;
@@ -218,10 +211,8 @@ le_ioasic_copytobuf_gap2(sc, fromv, boff, len)
}
void
-le_ioasic_copyfrombuf_gap2(sc, tov, boff, len)
- struct am7990_softc *sc;
- void *tov;
- int boff, len;
+le_ioasic_copyfrombuf_gap2(struct am7990_softc *sc, void *tov,
+ int boff, int len)
{
volatile caddr_t buf = sc->sc_mem;
caddr_t to = tov;
@@ -254,11 +245,8 @@ le_ioasic_copyfrombuf_gap2(sc, tov, boff, len)
*/
void
-le_ioasic_copytobuf_gap16(sc, fromv, boff, len)
- struct am7990_softc *sc;
- void *fromv;
- int boff;
- int len;
+le_ioasic_copytobuf_gap16(struct am7990_softc *sc, void *fromv,
+ int boff, int len)
{
volatile caddr_t buf = sc->sc_mem;
caddr_t from = fromv;
@@ -339,10 +327,8 @@ le_ioasic_copytobuf_gap16(sc, fromv, boff, len)
}
void
-le_ioasic_copyfrombuf_gap16(sc, tov, boff, len)
- struct am7990_softc *sc;
- void *tov;
- int boff, len;
+le_ioasic_copyfrombuf_gap16(struct am7990_softc *sc, void *tov,
+ int boff, int len)
{
volatile caddr_t buf = sc->sc_mem;
caddr_t to = tov;
@@ -415,9 +401,7 @@ le_ioasic_copyfrombuf_gap16(sc, tov, boff, len)
}
void
-le_ioasic_zerobuf_gap16(sc, boff, len)
- struct am7990_softc *sc;
- int boff, len;
+le_ioasic_zerobuf_gap16(struct am7990_softc *sc, int boff, int len)
{
volatile caddr_t buf = sc->sc_mem;
caddr_t bptr;
diff --git a/sys/dev/tc/if_le_tc.c b/sys/dev/tc/if_le_tc.c
index de60195b9fd..4d44baa2059 100644
--- a/sys/dev/tc/if_le_tc.c
+++ b/sys/dev/tc/if_le_tc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_tc.c,v 1.7 2005/10/11 06:03:18 martin Exp $ */
+/* $OpenBSD: if_le_tc.c,v 1.8 2007/06/17 21:20:47 jasper Exp $ */
/* $NetBSD: if_le_tc.c,v 1.12 2001/11/13 06:26:10 lukem Exp $ */
/*
@@ -65,9 +65,7 @@ struct cfattach le_tc_ca = {
#define LE_OFFSET_ROM 0x1c0000
int
-le_tc_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+le_tc_match(struct device *parent, void *match, void *aux)
{
struct tc_attach_args *d = aux;
@@ -78,9 +76,7 @@ le_tc_match(parent, match, aux)
}
void
-le_tc_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+le_tc_attach(struct device *parent, struct device *self, void *aux)
{
struct le_softc *lesc = (void *)self;
struct am7990_softc *sc = &lesc->sc_am7990;