Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex delta can't be negative. Wrapped value i...
details: https://anonhg.NetBSD.org/src/rev/afd5c0357e0b
branches: trunk
changeset: 325304:afd5c0357e0b
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Dec 17 13:11:18 2013 +0000
description:
delta can't be negative. Wrapped value is seen as large positive, so
covered already.
diffstat:
sys/arch/arm/cortex/gtmr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r acb7fd9c2061 -r afd5c0357e0b sys/arch/arm/cortex/gtmr.c
--- a/sys/arch/arm/cortex/gtmr.c Tue Dec 17 12:51:26 2013 +0000
+++ b/sys/arch/arm/cortex/gtmr.c Tue Dec 17 13:11:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gtmr.c,v 1.4 2013/09/12 15:38:04 matt Exp $ */
+/* $NetBSD: gtmr.c,v 1.5 2013/12/17 13:11:18 joerg Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.4 2013/09/12 15:38:04 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.5 2013/12/17 13:11:18 joerg Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -277,7 +277,7 @@
* adjust for jitter.
*/
delta -= sc->sc_autoinc;
- if (delta < 0 || delta >= sc->sc_autoinc) {
+ if (delta >= sc->sc_autoinc) {
delta = 0;
}
armreg_cntv_tval_write(sc->sc_autoinc - delta);
Home |
Main Index |
Thread Index |
Old Index