Skip to content

Commit

Permalink
i386: misc cpuinit annotations
Browse files Browse the repository at this point in the history
cpuid_class_cpu_callback() is callback function of a CPU hotplug
notifier_block (that is already marked as __cpuinitdata). Therefore
it can safely be marked as __cpuinit.

cpuid_device_create() is only referenced from other functions that
are __cpuinit or __init. So it can also be safely marked __cpuinit.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Satyam Sharma authored and Thomas Gleixner committed Oct 17, 2007
1 parent 761c4bf commit 1e32b07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/x86/kernel/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static const struct file_operations cpuid_fops = {
.open = cpuid_open,
};

static int cpuid_device_create(int i)
static int __cpuinit cpuid_device_create(int i)
{
int err = 0;
struct device *dev;
Expand All @@ -161,7 +161,9 @@ static int cpuid_device_create(int i)
return err;
}

static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb,
unsigned long action,
void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;

Expand Down

0 comments on commit 1e32b07

Please sign in to comment.