From: Li kunyu <kunyu@nfschina.com>
To: tglx@linutronix.de, peterz@infradead.org
Cc: linux-kernel@vger.kernel.org, Li kunyu <kunyu@nfschina.com>
Subject: [PATCH] kernel: cpu: Remove unnecessary ‘0’ values from err
Date: Thu, 28 Dec 2023 11:20:51 +0800 [thread overview]
Message-ID: <20231228032051.13440-1-kunyu@nfschina.com> (raw)
The err variable is assigned when it does not need to be defined, as it
has already been assigned before use.
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
kernel/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index c1f331ddf0dc7..bea9cd176449e 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1720,7 +1720,7 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
static int cpu_up(unsigned int cpu, enum cpuhp_state target)
{
- int err = 0;
+ int err;
if (!cpu_possible(cpu)) {
pr_err("can't online cpu %d because it is not configured as may-hotadd at boot time\n",
--
2.18.2
reply other threads:[~2023-12-28 3:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231228032051.13440-1-kunyu@nfschina.com \
--to=kunyu@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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®