Re: [PATCH for-6.0 5/9] spapr: Simplify error path of spapr_core_plug()

2020-11-24 Thread David Gibson
On Tue, Nov 24, 2020 at 02:07:27PM +0100, Greg Kurz wrote: > On Mon, 23 Nov 2020 16:13:18 +1100 > David Gibson wrote: > > > On Sat, Nov 21, 2020 at 12:42:04AM +0100, Greg Kurz wrote: > > > spapr_core_pre_plug() already guarantees that the slot for the given core > > > ID is available. It is thus

Re: [PATCH for-6.0 5/9] spapr: Simplify error path of spapr_core_plug()

2020-11-24 Thread Greg Kurz
On Mon, 23 Nov 2020 16:13:18 +1100 David Gibson wrote: > On Sat, Nov 21, 2020 at 12:42:04AM +0100, Greg Kurz wrote: > > spapr_core_pre_plug() already guarantees that the slot for the given core > > ID is available. It is thus safe to assume that spapr_find_cpu_slot() > > returns a slot during

Re: [PATCH for-6.0 5/9] spapr: Simplify error path of spapr_core_plug()

2020-11-22 Thread David Gibson
On Sat, Nov 21, 2020 at 12:42:04AM +0100, Greg Kurz wrote: > spapr_core_pre_plug() already guarantees that the slot for the given core > ID is available. It is thus safe to assume that spapr_find_cpu_slot() > returns a slot during plug. Turn the error path into an assertion. > It is also safe to

[PATCH for-6.0 5/9] spapr: Simplify error path of spapr_core_plug()

2020-11-20 Thread Greg Kurz
spapr_core_pre_plug() already guarantees that the slot for the given core ID is available. It is thus safe to assume that spapr_find_cpu_slot() returns a slot during plug. Turn the error path into an assertion. It is also safe to assume that no device is attached to the corresponding DRC and that