summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-03-19 11:41:57 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-03-19 11:41:57 +0000
commitd16c6aa7a075ad00ce2bccb0a5b52b930477d6ac (patch)
treea449a7c7ebfb7ff813f030b13fc6c53845d2d63e
parentcde54d41d41ecc698408ab4c1f6c1ed3bdcd939e (diff)
Reduces the noise around the global ``ticks'' variable by renaming all
local ones to ``nticks''. (missed in previous) ok stefan@, deraadt@
-rw-r--r--sys/dev/sdmmc/sdmmc.c8
-rw-r--r--sys/dev/sun/sunkbd.c12
-rw-r--r--sys/dev/usb/utrh.c12
3 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/sdmmc/sdmmc.c b/sys/dev/sdmmc/sdmmc.c
index 19cf9341622..2adfce82d69 100644
--- a/sys/dev/sdmmc/sdmmc.c
+++ b/sys/dev/sdmmc/sdmmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc.c,v 1.38 2015/03/14 03:38:49 jsg Exp $ */
+/* $OpenBSD: sdmmc.c,v 1.39 2016/03/19 11:41:56 mpi Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -548,10 +548,10 @@ sdmmc_init(struct sdmmc_softc *sc)
void
sdmmc_delay(u_int usecs)
{
- int ticks = usecs / (1000000 / hz);
+ int nticks = usecs / (1000000 / hz);
- if (!cold && ticks > 0)
- tsleep(&sdmmc_delay, PWAIT, "mmcdly", ticks);
+ if (!cold && nticks > 0)
+ tsleep(&sdmmc_delay, PWAIT, "mmcdly", nticks);
else
delay(usecs);
}
diff --git a/sys/dev/sun/sunkbd.c b/sys/dev/sun/sunkbd.c
index fa501110842..c2fd94738a0 100644
--- a/sys/dev/sun/sunkbd.c
+++ b/sys/dev/sun/sunkbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sunkbd.c,v 1.26 2011/11/09 14:22:37 shadchin Exp $ */
+/* $OpenBSD: sunkbd.c,v 1.27 2016/03/19 11:41:56 mpi Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -84,7 +84,7 @@ sunkbd_attach(struct sunkbd_softc *sc, struct wskbddev_attach_args *waa)
void
sunkbd_bell(struct sunkbd_softc *sc, u_int period, u_int pitch, u_int volume)
{
- int ticks, s;
+ int nticks, s;
u_int8_t c = SKBD_CMD_BELLON;
#if NTCTRL > 0
@@ -103,14 +103,14 @@ sunkbd_bell(struct sunkbd_softc *sc, u_int period, u_int pitch, u_int volume)
return;
}
if (sc->sc_bellactive == 0) {
- ticks = (period * hz) / 1000;
- if (ticks <= 0)
- ticks = 1;
+ nticks = (period * hz) / 1000;
+ if (nticks <= 0)
+ nticks = 1;
sc->sc_bellactive = 1;
sc->sc_belltimeout = 1;
(*sc->sc_sendcmd)(sc, &c, 1);
- timeout_add(&sc->sc_bellto, ticks);
+ timeout_add(&sc->sc_bellto, nticks);
}
splx(s);
}
diff --git a/sys/dev/usb/utrh.c b/sys/dev/usb/utrh.c
index 0695e87576b..85ef2f6bc72 100644
--- a/sys/dev/usb/utrh.c
+++ b/sys/dev/usb/utrh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utrh.c,v 1.19 2016/01/09 04:14:42 jcs Exp $ */
+/* $OpenBSD: utrh.c,v 1.20 2016/03/19 11:41:56 mpi Exp $ */
/*
* Copyright (c) 2009 Yojiro UO <yuo@nui.org>
@@ -243,18 +243,18 @@ utrh_refresh(void *arg)
/* return C-degree * 100 value */
int
-utrh_sht1x_temp(unsigned int ticks)
+utrh_sht1x_temp(unsigned int nticks)
{
- return (ticks - 4010);
+ return (nticks - 4010);
}
/* return %RH * 1000 */
int
-utrh_sht1x_rh(unsigned int ticks, int temp)
+utrh_sht1x_rh(unsigned int nticks, int temp)
{
int rh_l, rh;
- rh_l = (-40000 + 405 * ticks) - ((7 * ticks * ticks) / 250);
- rh = ((temp - 2500) * (1 + (ticks >> 7)) + rh_l) / 10;
+ rh_l = (-40000 + 405 * nticks) - ((7 * nticks * nticks) / 250);
+ rh = ((temp - 2500) * (1 + (nticks >> 7)) + rh_l) / 10;
return rh;
}