From: Simon Horman , Keir Fraser Subject: [Patch v3] static, __init and __initdata symbols in machine_kexec.c Date: Wed, 16 May 2007 15:49:19 +0900 Message-ID: <1179298159.23300.2@tabatha.lab.ultramonkey.org> References: <1179298159.23300@tabatha.lab.ultramonkey.org> <1179298159.23300.1@tabatha.lab.ultramonkey.org> <20070516073132.GA8298@verge.net.au> Return-path: In-Reply-To: <20070516073132.GA8298@verge.net.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org Some symbols in machine_kexec.c really ought to be static and, marked __init or __initdata. Signed-off-by: Simon Horman --- linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Update: put __init somehere a bit less silly for the struct resource symbols Update: Use __initdata instead of __init for variables, as suggested by Keir Fraser Index: xen-ia64-unstable.hg/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c =================================================================== --- xen-ia64-unstable.hg.orig/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c 2007-05-16 16:37:04.000000000 +0900 +++ xen-ia64-unstable.hg/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c 2007-05-16 16:44:26.000000000 +0900 @@ -11,11 +11,11 @@ extern void machine_kexec_setup_load_arg(xen_kexec_image_t *xki, struct kimage *image); -int xen_max_nr_phys_cpus; -struct resource xen_hypervisor_res; -struct resource *xen_phys_cpus; +static int __initdata xen_max_nr_phys_cpus; +static struct resource __initdata xen_hypervisor_res; +static struct resource __initdata *xen_phys_cpus; -void xen_machine_kexec_setup_resources(void) +void __init xen_machine_kexec_setup_resources(void) { xen_kexec_range_t range; struct resource *res; @@ -104,7 +104,7 @@ void xen_machine_kexec_setup_resources(v return; } -void xen_machine_kexec_register_resources(struct resource *res) +void __init xen_machine_kexec_register_resources(struct resource *res) { int k;