X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH] Fix brace and parentheses in thinkpad_acpi.c
@ 2025-01-16  4:51 Matheus Polkorny
  2025-01-17 16:30 ` Ilpo Järvinen
  0 siblings, 1 reply; 2+ messages in thread
From: Matheus Polkorny @ 2025-01-16  4:51 UTC (permalink / raw)
  To: hmh, hdegoede, ilpo.jarvinen
  Cc: Matheus Polkorny, ibm-acpi-devel, platform-driver-x86

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@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-17 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16  4:51 [PATCH] Fix brace and parentheses in thinkpad_acpi.c Matheus Polkorny
2025-01-17 16:30 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox