Fix brace and parentheses in thinkpad_acpi.c
PATCH 1/1 Fix brace and parentheses in thinkpad_acpi.c
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
--- drivers/platform/x86/thinkpad_acpi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/platform/x86/thinkpad_acpi.c +4 -4
@@ -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 ; }
Signature · 1 line
2.45.2
Ilpo Järvinen
maintainerOn Thu, 16 Jan 2025, Matheus Polkorny wrote:
Hi Matheus,
You need to add the correct prefix(es) to the shortlog in the subject. Please see what the existing commits use in 'git log' of the file as the prefix (there might be variation at times, so try to pick the most common prefix that makes sense).
Quoted 5 lines
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
I don't see any change in your patch which relates to this??
Quoted 50 lines
- Fixes parentheses usage in conditionals, ensuring proper readability
Reported by checkpatch.pl:
ERROR: open brace '{' following function definitions go on the next lineSigned-off-by Matheus Polkorny <[email protected]>--- drivers/platform/x86/thinkpad_acpi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/platform/x86/thinkpad_acpi.c +4
-4@@ -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 ; }
Signature · 1 line
i.