From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Matheus Polkorny <mpolkorny@gmail.com>
Cc: hmh@hmh.eng.br, Hans de Goede <hdegoede@redhat.com>,
ibm-acpi-devel@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] Fix brace and parentheses in thinkpad_acpi.c
Date: Fri, 17 Jan 2025 18:30:22 +0200 (EET) [thread overview]
Message-ID: <66715687-2e3a-d249-8eeb-921daf2b1f64@linux.intel.com> (raw)
In-Reply-To: <20250116045217.575059-1-mpolkorny@gmail.com>
On 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).
> 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??
> - 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;
> }
>
--
i.
prev parent reply other threads:[~2025-01-17 16:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=66715687-2e3a-d249-8eeb-921daf2b1f64@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=mpolkorny@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox