mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel: time: Return ENXIO instead of ENODEV when call smp_call_function_single fail in clockevents_unbind
@ 2021-12-19 15:29 gchen
  2021-12-25  5:21 ` Chen Gang
  0 siblings, 1 reply; 2+ messages in thread
From: gchen @ 2021-12-19 15:29 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Chen Gang

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] kernel: time: Return ENXIO instead of ENODEV when call smp_call_function_single fail in clockevents_unbind
  2021-12-19 15:29 [PATCH] kernel: time: Return ENXIO instead of ENODEV when call smp_call_function_single fail in clockevents_unbind gchen
@ 2021-12-25  5:21 ` Chen Gang
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Gang @ 2021-12-25  5:21 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel

Hello:

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

Thanks.

On 12/19/21 11:29 PM, gchen@itskywalker.com wrote:
> 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;
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-25  5:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-19 15:29 [PATCH] kernel: time: Return ENXIO instead of ENODEV when call smp_call_function_single fail in clockevents_unbind gchen
2021-12-25  5:21 ` Chen Gang

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®