Re: [PATCH v6 04/16] ACPI: processor: Move checks and availability of acpi_processor earlier

Jonathan Cameron
2024-04-17T15:19:23Z

> > result = -ENODEV;
> > @@ -469,15 +483,16 @@ static void acpi_processor_remove(struct
> > acpi_device *device)
> > device_release_driver(pr->dev);
> > acpi_unbind_one(pr->dev);
> >
> > - /* Clean up. */
> > - per_cpu(processor_device_array, pr->id) = NULL;
> > - per_cpu(processors, pr->id) = NULL;
> > -
> > cpu_maps_update_begin();
> > cpus_write_lock();
> >
> > /* Remove the CPU. */
> > arch_unregister_cpu(pr->id);
> > +
> > + /* Clean up. */
> > + per_cpu(processor_device_array, pr->id) = NULL;
> > + per_cpu(processors, pr->id) = NULL;
> > +
>
>
> Shouldn't above change come after acpi_unmap_cpu() i.e. after next line?
>
>
> > acpi_unmap_cpu(pr->id);
Agreed - that is more logically correct. I'll move it for v7.

Thanks,

Jonathan