Re: [PATCH 4/4] spapr: Make spapr_cpu_core_unrealize() idempotent

2020-10-12 Thread Greg Kurz
On Mon, 12 Oct 2020 17:20:07 +0200 Greg Kurz wrote: > spapr_cpu_core_realize() has an err_unrealize label which partially > duplicates the code of spapr_cpu_core_realize(). > > Let's make spapr_cpu_core_unrealize() idempotent and call it instead. > The registration and unregistration of the rese

[PATCH 4/4] spapr: Make spapr_cpu_core_unrealize() idempotent

2020-10-12 Thread Greg Kurz
spapr_cpu_core_realize() has an err_unrealize label which partially duplicates the code of spapr_cpu_core_realize(). Let's make spapr_cpu_core_unrealize() idempotent and call it instead. The registration and unregistration of the reset handler are moved around to simplify the code even more. Sign