diff options
author | James Morse <james.morse@arm.com> | 2023-09-14 15:07:39 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-12-11 09:43:20 +0000 |
commit | 573c0969f8d0428441f17e1cedecca70c72c5e9e (patch) | |
tree | 3f89fce5c86660dbf5f55ce5a77b6f0ae13b81b5 | |
parent | de091033cf30f90eef07ec5e57cc996fa47148cc (diff) |
ACPI: processor: Only call arch_unregister_cpu() if HOTPLUG_CPU is selected
The kbuild robot points out that configurations without HOTPLUG_CPU
selected can try to build acpi_processor_post_eject() without success
as arch_unregister_cpu() is not defined.
Check this explicitly. This will be merged into:
| ACPI: Add post_eject to struct acpi_scan_handler for cpu hotplug
for any subsequent posting.
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: James Morse <james.morse@arm.com>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Tested-by: Jianyong Wu <jianyong.wu@arm.com>
---
This should probably be squashed into an earlier patch.
-rw-r--r-- | drivers/acpi/acpi_processor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 5dabb426481f..ea12e70dfd39 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -537,7 +537,7 @@ static void acpi_processor_post_eject(struct acpi_device *device) unsigned long long sta; acpi_status status; - if (!device) + if (!IS_ENABLED(CONFIG_HOTPLUG_CPU) || !device) return; pr = acpi_driver_data(device); |