diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2004-09-17 10:18:02 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2004-09-17 10:18:02 +0000 |
commit | 91a8ef67e336f14181f36b1b3c2746be9d616d68 (patch) | |
tree | df18a024c31cb8043994e42bcb28418762d9ec4a /sys | |
parent | 9a9f63acfa5f59e7a3990a8e27c520008785e9b2 (diff) |
Some cleanup:
- don't mix unsigned and u_int across the code
- un'static some funcs
ok art@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/amdpm.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/piixpm.c | 8 | ||||
-rw-r--r-- | sys/kern/kern_tc.c | 12 |
3 files changed, 16 insertions, 14 deletions
diff --git a/sys/dev/pci/amdpm.c b/sys/dev/pci/amdpm.c index dec9a1d8b75..dc77a452902 100644 --- a/sys/dev/pci/amdpm.c +++ b/sys/dev/pci/amdpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdpm.c,v 1.4 2004/07/28 17:15:12 tholo Exp $ */ +/* $OpenBSD: amdpm.c,v 1.5 2004/09/17 10:18:01 grange Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ #include <dev/pci/amdpmreg.h> #ifdef __HAVE_TIMECOUNTER -unsigned amdpm_get_timecount(struct timecounter *tc); +u_int amdpm_get_timecount(struct timecounter *tc); #ifndef AMDPM_FREQUENCY #define AMDPM_FREQUENCY 3579545 @@ -218,13 +218,13 @@ amdpm_rnd_callout(void *v) } #ifdef __HAVE_TIMECOUNTER -unsigned +u_int amdpm_get_timecount(struct timecounter *tc) { struct amdpm_softc *sc = tc->tc_priv; - unsigned u2; + u_int u2; #if 0 - unsigned u1, u3; + u_int u1, u3; #endif u2 = bus_space_read_4(sc->sc_iot, sc->sc_ioh, AMDPM_TMR); diff --git a/sys/dev/pci/piixpm.c b/sys/dev/pci/piixpm.c index 7d9b10bf3fc..136b701442b 100644 --- a/sys/dev/pci/piixpm.c +++ b/sys/dev/pci/piixpm.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $OpenBSD: piixpm.c,v 1.1 2004/07/28 17:15:12 tholo Exp $ + * $OpenBSD: piixpm.c,v 1.2 2004/09/17 10:18:01 grange Exp $ * $FreeBSD: /repoman/r/ncvs/src/sys/i386/i386/mp_clock.c,v 1.19 2004/05/30 20:34:57 phk Exp $ */ @@ -65,7 +65,7 @@ int piixpm_probe(struct device *, void *, void *); void piixpm_attach(struct device *, struct device *, void *); #ifdef __HAVE_TIMECOUNTER -unsigned piix_get_timecount(struct timecounter *tc); +u_int piix_get_timecount(struct timecounter *tc); static u_int piix_freq = 14318182/4; @@ -110,11 +110,11 @@ SYSCTL_PROC(_machdep, OID_AUTO, piix_freq, CTLTYPE_INT | CTLFLAG_RW, #endif #ifdef __HAVE_TIMECOUNTER -unsigned +u_int piix_get_timecount(struct timecounter *tc) { struct piixpm_softc *sc = (struct piixpm_softc *) tc->tc_priv; - unsigned u1, u2, u3; + u_int u1, u2, u3; u2 = bus_space_read_4(sc->sc_iot, sc->sc_ioh, 8); u3 = bus_space_read_4(sc->sc_iot, sc->sc_ioh, 8); diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 0c56f4b0dd2..89b88a1c61d 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $OpenBSD: kern_tc.c,v 1.2 2004/08/04 15:36:44 art Exp $ + * $OpenBSD: kern_tc.c,v 1.3 2004/09/17 10:18:01 grange Exp $ * $FreeBSD: src/sys/kern/kern_tc.c,v 1.148 2003/03/18 08:45:23 phk Exp $ */ @@ -27,6 +27,8 @@ */ #define LARGE_STEP 200 +u_int dummy_get_timecount(struct timecounter *); + void ntp_update_second(int64_t *, time_t *); int sysctl_tc_hardware(void *, size_t *, void *, size_t); int sysctl_tc_choice(void *, size_t *, void *, size_t); @@ -37,7 +39,7 @@ int sysctl_tc_choice(void *, size_t *, void *, size_t); * time services. */ -static u_int +u_int dummy_get_timecount(struct timecounter *tc) { static u_int now; @@ -96,7 +98,7 @@ extern struct timeval adjtimedelta; static struct bintime boottimebin; static int timestepwarnings; -static void tc_windup(void); +void tc_windup(void); /* * Return the difference between the timehands' counter value now and what @@ -261,7 +263,7 @@ getmicrotime(struct timeval *tvp) void tc_init(struct timecounter *tc) { - unsigned u; + u_int u; u = tc->tc_frequency / tc->tc_counter_mask; /* XXX: We need some margin here, 10% is a guess */ @@ -335,7 +337,7 @@ tc_setclock(struct timespec *ts) * it the active timehands. Along the way we might switch to a different * timecounter and/or do seconds processing in NTP. Slightly magic. */ -static void +void tc_windup(void) { struct bintime bt; |