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

Jonathan Cameron Jonathan.Cameron at Huawei.com
Wed Apr 17 08:19:19 PDT 2024


> >   		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



More information about the linux-arm-kernel mailing list