From 528ecaebc8ab7999f8d64be026ba87db4001eb40 Mon Sep 17 00:00:00 2001 From: riastradh Date: Fri, 31 Dec 2021 17:22:35 +0000 Subject: thinkpad(4): Omit workaround for acpiec_bus_read. acpiec_bus_read now initializes the whole ACPI_INTEGER like its signature suggests, so we don't need to pick out the low bits of the result or carefully avoid undefined behaviour from uninitialized stack garbage. --- sys/dev/acpi/thinkpad_acpi.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/acpi/thinkpad_acpi.c b/sys/dev/acpi/thinkpad_acpi.c index 12826a1676e..35005120d57 100644 --- a/sys/dev/acpi/thinkpad_acpi.c +++ b/sys/dev/acpi/thinkpad_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: thinkpad_acpi.c,v 1.53 2021/05/30 11:24:10 riastradh Exp $ */ +/* $NetBSD: thinkpad_acpi.c,v 1.54 2021/12/31 17:22:35 riastradh Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.53 2021/05/30 11:24:10 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.54 2021/12/31 17:22:35 riastradh Exp $"); #include #include @@ -803,12 +803,6 @@ thinkpad_fan_refresh(struct sysmon_envsys *sme, envsys_data_t *edata) return; } - /* - * Extract the low bytes from buffers - */ - lo = ((uint8_t *)&lo)[0]; - hi = ((uint8_t *)&hi)[0]; - rpm = ((((int)hi) << 8) | ((int)lo)); if (rpm < 0) { edata->state = ENVSYS_SINVALID; -- cgit