Messages in this thread | | | From | Valentin Schneider <> | Subject | Re: [PATCH v4] cpu/hotplug: Do not bail-out in DYING/STARTING sections | Date | Tue, 19 Jul 2022 16:12:03 +0100 |
| |
On 04/07/22 14:13, Vincent Donnefort wrote: > +static int _cpuhp_invoke_callback_range(bool bringup, > + unsigned int cpu, > + struct cpuhp_cpu_state *st, > + enum cpuhp_state target, > + bool nofail) [...] > + if (nofail) { > + pr_warn("CPU %u %s state %s (%d) failed (%d)\n", > + cpu, bringup ? "UP" : "DOWN", > + cpuhp_get_step(st->state)->name, > + st->state, err); > + ret = -1;
On a single failure we'll get two warns (WARN_ON_ONCE() + pr_warn(), and then subsequently just the pr_warn()), is that intended?
Also, why not have ret = err here?
> + } else { > + ret = err; > break; > + } > } > > - return err; > + return ret;
> +static inline void cpuhp_invoke_callback_range_nofail(bool bringup, > + unsigned int cpu, > + struct cpuhp_cpu_state *st, > + enum cpuhp_state target) > +{ > + WARN_ON_ONCE(_cpuhp_invoke_callback_range(bringup, cpu, st, target, true)); > } >
| |