Skip to content

Commit d7268a3

Browse files
Fenghua Yurjwysocki
authored andcommitted
CPU: Add right qualifiers for alloc_frozen_cpus() and cpu_hotplug_pm_sync_init()
Add __init for functions alloc_frozen_cpus() and cpu_hotplug_pm_sync_init() because they are only called during boot time. Add static for function cpu_hotplug_pm_sync_init() because its scope is limited in this file only. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
1 parent 5307427 commit d7268a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/cpu.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ void __ref enable_nonboot_cpus(void)
470470
cpu_maps_update_done();
471471
}
472472

473-
static int alloc_frozen_cpus(void)
473+
static int __init alloc_frozen_cpus(void)
474474
{
475475
if (!alloc_cpumask_var(&frozen_cpus, GFP_KERNEL|__GFP_ZERO))
476476
return -ENOMEM;
@@ -543,7 +543,7 @@ cpu_hotplug_pm_callback(struct notifier_block *nb,
543543
}
544544

545545

546-
int cpu_hotplug_pm_sync_init(void)
546+
static int __init cpu_hotplug_pm_sync_init(void)
547547
{
548548
pm_notifier(cpu_hotplug_pm_callback, 0);
549549
return 0;

0 commit comments

Comments
 (0)