[PATCH] Fix brace and parentheses in thinkpad_acpi.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch addresses checkpatch diagnostics related to
coding style in thinkpad_acpi.c:

- Ensures open braces '{' for function definitions are placed on
the next line
- Fixes parentheses usage in conditionals, ensuring proper readability

Reported by checkpatch.pl:
ERROR: open brace '{' following function definitions go on the next line

Signed-off-by: Matheus Polkorny <mpolkorny@xxxxxxxxx>
---
 drivers/platform/x86/thinkpad_acpi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 2cfb2ac3f465..7a693092f398 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -9519,14 +9519,14 @@ static int tpacpi_battery_set(int what, int battery, int value)
 
 	switch (what) {
 	case THRESHOLD_START:
-		if ACPI_FAILURE(tpacpi_battery_acpi_eval(SET_START, &ret, param)) {
+		if (ACPI_FAILURE(tpacpi_battery_acpi_eval(SET_START, &ret, param))) {
 			pr_err("failed to set charge threshold on battery %d",
 					battery);
 			return -ENODEV;
 		}
 		return 0;
 	case THRESHOLD_STOP:
-		if ACPI_FAILURE(tpacpi_battery_acpi_eval(SET_STOP, &ret, param)) {
+		if (ACPI_FAILURE(tpacpi_battery_acpi_eval(SET_STOP, &ret, param))) {
 			pr_err("failed to set stop threshold: %d", battery);
 			return -ENODEV;
 		}
@@ -9608,7 +9608,7 @@ static int tpacpi_battery_probe(int battery)
 	 * 8) Check for support
 	 */
 	if (acpi_has_method(hkey_handle, GET_START)) {
-		if ACPI_FAILURE(tpacpi_battery_acpi_eval(GET_START, &ret, battery)) {
+		if (ACPI_FAILURE(tpacpi_battery_acpi_eval(GET_START, &ret, battery))) {
 			pr_err("Error probing battery %d\n", battery);
 			return -ENODEV;
 		}
@@ -9627,7 +9627,7 @@ static int tpacpi_battery_probe(int battery)
 		}
 	}
 	if (acpi_has_method(hkey_handle, GET_STOP)) {
-		if ACPI_FAILURE(tpacpi_battery_acpi_eval(GET_STOP, &ret, battery)) {
+		if (ACPI_FAILURE(tpacpi_battery_acpi_eval(GET_STOP, &ret, battery))) {
 			pr_err("Error probing battery stop; %d\n", battery);
 			return -ENODEV;
 		}
-- 
2.45.2





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux