Module Name:    src
Committed By:   riastradh
Date:           Sun Apr 12 01:11:52 UTC 2020

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

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/acpi/acpi_ec.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/acpi_ec.c
diff -u src/sys/dev/acpi/acpi_ec.c:1.79 src/sys/dev/acpi/acpi_ec.c:1.80
--- src/sys/dev/acpi/acpi_ec.c:1.79	Sun Apr 12 01:11:43 2020
+++ src/sys/dev/acpi/acpi_ec.c	Sun Apr 12 01:11:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_ec.c,v 1.79 2020/04/12 01:11:43 riastradh Exp $	*/
+/*	$NetBSD: acpi_ec.c,v 1.80 2020/04/12 01:11:52 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger <jo...@netbsd.org>.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.79 2020/04/12 01:11:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.80 2020/04/12 01:11:52 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/callout.h>
@@ -404,6 +404,7 @@ post_data_map:
 static bool
 acpiec_suspend(device_t dv, const pmf_qual_t *qual)
 {
+
 	acpiec_cold = true;
 
 	return true;
@@ -412,6 +413,7 @@ acpiec_suspend(device_t dv, const pmf_qu
 static bool
 acpiec_resume(device_t dv, const pmf_qual_t *qual)
 {
+
 	acpiec_cold = false;
 
 	return true;
@@ -454,9 +456,10 @@ acpiec_parse_gpe_package(device_t self, 
 		ACPI_FREE(p);
 		return false;
 	}
-	
+
 	if (p->Package.Count != 2) {
-		aprint_error_dev(self, "_GPE package does not contain 2 elements\n");
+		aprint_error_dev(self,
+		    "_GPE package does not contain 2 elements\n");
 		ACPI_FREE(p);
 		return false;
 	}
@@ -511,6 +514,7 @@ static ACPI_STATUS
 acpiec_space_setup(ACPI_HANDLE region, uint32_t func, void *arg,
     void **region_arg)
 {
+
 	if (func == ACPI_REGION_DEACTIVATE)
 		*region_arg = NULL;
 	else
@@ -528,9 +532,11 @@ acpiec_lock(device_t dv)
 	mutex_enter(&sc->sc_access_mtx);
 
 	if (sc->sc_need_global_lock) {
-		rv = AcpiAcquireGlobalLock(EC_LOCK_TIMEOUT, &sc->sc_global_lock);
+		rv = AcpiAcquireGlobalLock(EC_LOCK_TIMEOUT,
+		    &sc->sc_global_lock);
 		if (rv != AE_OK) {
-			aprint_error_dev(dv, "failed to acquire global lock: %s\n",
+			aprint_error_dev(dv,
+			    "failed to acquire global lock: %s\n",
 			    AcpiFormatException(rv));
 			return;
 		}
@@ -546,7 +552,8 @@ acpiec_unlock(device_t dv)
 	if (sc->sc_need_global_lock) {
 		rv = AcpiReleaseGlobalLock(sc->sc_global_lock);
 		if (rv != AE_OK) {
-			aprint_error_dev(dv, "failed to release global lock: %s\n",
+			aprint_error_dev(dv,
+			    "failed to release global lock: %s\n",
 			    AcpiFormatException(rv));
 		}
 	}
@@ -587,7 +594,8 @@ acpiec_read(device_t dv, uint8_t addr, u
 	} else if (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
 		mutex_exit(&sc->sc_mtx);
 		acpiec_unlock(dv);
-		aprint_error_dev(dv, "command takes over %d sec...\n", EC_CMD_TIMEOUT);
+		aprint_error_dev(dv,
+		    "command takes over %d sec...\n", EC_CMD_TIMEOUT);
 		return AE_ERROR;
 	}
 
@@ -634,7 +642,8 @@ acpiec_write(device_t dv, uint8_t addr, 
 	} else if (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
 		mutex_exit(&sc->sc_mtx);
 		acpiec_unlock(dv);
-		aprint_error_dev(dv, "command takes over %d sec...\n", EC_CMD_TIMEOUT);
+		aprint_error_dev(dv,
+		    "command takes over %d sec...\n", EC_CMD_TIMEOUT);
 		return AE_ERROR;
 	}
 
@@ -674,7 +683,7 @@ acpiec_space_handler(uint32_t func, ACPI
 		break;
 	case ACPI_WRITE:
 		for (i = 0; i < width; i += 8, ++addr) {
-			reg = (*value >>i) & 0xff;
+			reg = (*value >> i) & 0xff;
 			rv = acpiec_write(dv, addr, reg);
 			if (rv != AE_OK)
 				break;
@@ -867,7 +876,8 @@ acpiec_bus_read(device_t dv, u_int addr,
 ACPI_STATUS
 acpiec_bus_write(device_t dv, u_int addr, ACPI_INTEGER val, int width)
 {
-	return acpiec_space_handler(ACPI_WRITE, addr, width * 8, &val, dv, NULL);
+	return acpiec_space_handler(ACPI_WRITE, addr, width * 8, &val, dv,
+	    NULL);
 }
 
 ACPI_HANDLE

Reply via email to