mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: gchen@itskywalker.com
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, Chen Gang <gchen@itskywalker.com>
Subject: [PATCH] kernel: time: Return ENXIO instead of ENODEV when call smp_call_function_single fail in clockevents_unbind
Date: Sun, 19 Dec 2021 23:29:29 +0800	[thread overview]
Message-ID: <20211219152929.479876-1-gchen@itskywalker.com> (raw)

From: Chen Gang <gchen@itskywalker.com>

smp_call_function_single will return -ENXIO for failure, so ENXIO needs
to be as the default value of cu.res for return instead of ENODEV.

Signed-off-by: Chen Gang <gchen@itskywalker.com>
---
 kernel/time/clockevents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 003ccf338d20..59b83bee03e6 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -416,7 +416,7 @@ static void __clockevents_unbind(void *arg)
  */
 static int clockevents_unbind(struct clock_event_device *ced, int cpu)
 {
-	struct ce_unbind cu = { .ce = ced, .res = -ENODEV };
+	struct ce_unbind cu = { .ce = ced, .res = -ENXIO };
 
 	smp_call_function_single(cpu, __clockevents_unbind, &cu, 1);
 	return cu.res;
-- 
2.24.0.308.g228f53135a


             reply	other threads:[~2021-12-19 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-19 15:29 gchen [this message]
2021-12-25  5:21 ` Chen Gang

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=20211219152929.479876-1-gchen@itskywalker.com \
    --to=gchen@itskywalker.com \
    --cc=linux-kernel@vger.kernel.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®