Module Name:    src
Committed By:   riastradh
Date:           Fri Dec 31 17:22:35 UTC 2021

Modified Files:
        src/sys/dev/acpi: thinkpad_acpi.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/acpi/thinkpad_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/thinkpad_acpi.c
diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.53 src/sys/dev/acpi/thinkpad_acpi.c:1.54
--- src/sys/dev/acpi/thinkpad_acpi.c:1.53	Sun May 30 11:24:10 2021
+++ src/sys/dev/acpi/thinkpad_acpi.c	Fri Dec 31 17:22:35 2021
@@ -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 <jmcne...@invisible.ca>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__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 <sys/param.h>
 #include <sys/device.h>
@@ -803,12 +803,6 @@ thinkpad_fan_refresh(struct sysmon_envsy
 		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;

Reply via email to