Skip to contentSkip to conversation

kernel: time: Return ENXIO instead of ENODEV when call smp_call_function_single fail in clockevents_unbind

PATCH In review [email protected] 2 participants 2 messages Dec 19, 2021 – Dec 25, 2021 High-resolution timers, timer wheel, clockevents

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel: time: Return ENXIO instead of ENODEV when call smp_call_function_single fail in clockevents_unbind

From: Chen Gang <[email protected]>

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.

---
 kernel/time/clockevents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/clockevents.c +1 -1
index 003ccf338d20..59b83bee03e6 100644
@@ -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;
Signature · 1 line
2.24.0.308.g228f53135a
#1 lore raw

Hello:

The original mail was not sent successfully, so I send it again with another mailbox.

Thanks.

Quoted 24 lines · On 12/19/21 11:29 PM, [email protected] wrote:

From: Chen Gang <[email protected]>

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.

---
 kernel/time/clockevents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/clockevents.c +1 -1
index 003ccf338d20..59b83bee03e6 100644
@@ -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;