From 55cc037395349ceed2ce844c34e8f18f32cecb5a Mon Sep 17 00:00:00 2001 From: cheloha Date: Thu, 25 Aug 2022 18:01:54 +0000 Subject: [PATCH] acpihpet(4): don't truncate HPET frequency to 32-bit value timecounter.tc_frequency is a 64-bit value: this cast is unnecessary. Split off from the acpihpet_delay() commit at jsg@'s suggestion. Link1: https://marc.info/?l=openbsd-tech&m=166053729104923&w=2 Link2: https://marc.info/?l=openbsd-tech&m=166132727120528&w=2 probably ok jsg@ --- sys/dev/acpi/acpihpet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpi/acpihpet.c b/sys/dev/acpi/acpihpet.c index 87eaf02d37e..bb1e6c56947 100644 --- a/sys/dev/acpi/acpihpet.c +++ b/sys/dev/acpi/acpihpet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpihpet.c,v 1.27 2022/08/25 17:54:33 cheloha Exp $ */ +/* $OpenBSD: acpihpet.c,v 1.28 2022/08/25 18:01:54 cheloha Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -264,7 +264,7 @@ acpihpet_attach(struct device *parent, struct device *self, void *aux) freq = 1000000000000000ull / period; printf(": %lld Hz\n", freq); - hpet_timecounter.tc_frequency = (uint32_t)freq; + hpet_timecounter.tc_frequency = freq; hpet_timecounter.tc_priv = sc; hpet_timecounter.tc_name = sc->sc_dev.dv_xname; tc_init(&hpet_timecounter); -- 2.20.1