public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i386 cpuid: Misc cpuinit annotations
@ 2007-08-22 23:38 Satyam Sharma
  2007-08-23 22:53 ` H. Peter Anvin
  0 siblings, 1 reply; 2+ messages in thread
From: Satyam Sharma @ 2007-08-22 23:38 UTC (permalink / raw)
  To: H Peter Anvin; +Cc: Andrew Morton, Linux Kernel Mailing List


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.

Signed-off-by: Satyam Sharma <satyam@infradead.org>

---

 arch/i386/kernel/cpuid.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c
index 5c2faa1..a6761fd 100644
--- a/arch/i386/kernel/cpuid.c
+++ b/arch/i386/kernel/cpuid.c
@@ -152,7 +152,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;
@@ -163,7 +163,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;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i386 cpuid: Misc cpuinit annotations
  2007-08-22 23:38 [PATCH] i386 cpuid: Misc cpuinit annotations Satyam Sharma
@ 2007-08-23 22:53 ` H. Peter Anvin
  0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2007-08-23 22:53 UTC (permalink / raw)
  To: Satyam Sharma; +Cc: Andrew Morton, Linux Kernel Mailing List

Satyam Sharma wrote:
> 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.
> 
> Signed-off-by: Satyam Sharma <satyam@infradead.org>

Acked-by: H. Peter Anvin <hpa@zytor.com>

>  arch/i386/kernel/cpuid.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c
> index 5c2faa1..a6761fd 100644
> --- a/arch/i386/kernel/cpuid.c
> +++ b/arch/i386/kernel/cpuid.c
> @@ -152,7 +152,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;
> @@ -163,7 +163,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;
>  

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-23 22:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-22 23:38 [PATCH] i386 cpuid: Misc cpuinit annotations Satyam Sharma
2007-08-23 22:53 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox