Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/acpi Avoid overflow when calculating watchdog o...
details: https://anonhg.NetBSD.org/src/rev/ff1d17b9b3ce
branches: trunk
changeset: 445353:ff1d17b9b3ce
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Oct 24 11:04:54 2018 +0000
description:
Avoid overflow when calculating watchdog offset.
diffstat:
sys/arch/arm/acpi/sbsawdt_acpi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 0ac6d334f636 -r ff1d17b9b3ce sys/arch/arm/acpi/sbsawdt_acpi.c
--- a/sys/arch/arm/acpi/sbsawdt_acpi.c Wed Oct 24 11:02:13 2018 +0000
+++ b/sys/arch/arm/acpi/sbsawdt_acpi.c Wed Oct 24 11:04:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sbsawdt_acpi.c,v 1.1 2018/10/24 11:01:47 jmcneill Exp $ */
+/* $NetBSD: sbsawdt_acpi.c,v 1.2 2018/10/24 11:04:54 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbsawdt_acpi.c,v 1.1 2018/10/24 11:01:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbsawdt_acpi.c,v 1.2 2018/10/24 11:04:54 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -182,7 +182,7 @@
* second time that the offset is reached, the WD1 signal is raised
* which will either interrupt privileged software or cause a PE reset.
*/
- const uint32_t wor = (smw->smw_period * sc->sc_cntfreq) / 2;
+ const uint32_t wor = smw->smw_period * sc->sc_cntfreq / 2;
CONTROL_WR4(sc, C_WCS_REG, 0);
CONTROL_WR4(sc, C_WOR_REG, wor);
Home |
Main Index |
Thread Index |
Old Index