From: Eduardo Vasconcelos <eduardo@eduardovasconcelos.com>
To: mpearson-lenovo@squebb.ca, derekjohn.clark@gmail.com,
hmh@hmh.eng.br, hansg@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: Eduardo Vasconcelos <eduardo@eduardovasconcelos.com>,
platform-driver-x86@vger.kernel.org,
ibm-acpi-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH] platform/x86: thinkpad_acpi: Remove unneeded goto
Date: Sat, 25 Apr 2026 03:39:34 -0300 [thread overview]
Message-ID: <20260425063936.9360-1-eduardo@eduardovasconcelos.com> (raw)
Remove an unneeded goto statement in hotkey_kthread(). Since
the function has a single exit location with no cleanup code,
the jump provides no benefit. Per the kernel coding style,
returning directly is preferred over goto in such case [1].
[1] https://www.kernel.org/doc/html/latest/process/coding-style.html
Signed-off-by: Eduardo Vasconcelos <eduardo@eduardovasconcelos.com>
Tested-by: Eduardo Vasconcelos <eduardo@eduardovasconcelos.com> (T420si)
---
drivers/platform/x86/lenovo/thinkpad_acpi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
index e1cee42a1683..d4ed6f1216f2 100644
--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -2469,7 +2469,7 @@ static int hotkey_kthread(void *data)
bool was_frozen;
if (tpacpi_lifecycle == TPACPI_LIFE_EXITING)
- goto exit;
+ return 0;
set_freezable();
@@ -2526,7 +2526,6 @@ static int hotkey_kthread(void *data)
si ^= 1;
}
-exit:
return 0;
}
--
2.54.0
next reply other threads:[~2026-04-25 6:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 6:39 Eduardo Vasconcelos [this message]
2026-04-25 12:49 ` Mark Pearson
2026-04-28 16:06 ` Ilpo Järvinen
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=20260425063936.9360-1-eduardo@eduardovasconcelos.com \
--to=eduardo@eduardovasconcelos.com \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--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
all inboxes | Powered by JetHome®