[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [Patch v4] static, __init and __initdata symbols in machine_kexec.c

Some symbols in machine_kexec.c really ought to be static or,
marked __init or __initdata.

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

 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

Update: On further investigation it seems that xen_hypervisor_res and
        xen_phys_cpus should not be __initdata as they  are inserted into
        iomem_resource and can be accessed via /proc/iomem's proc handler,
        and likely other palces too.

    2007-05-16 17:30:50.000000000 +0900
+++ xen-ia64-unstable.hg/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c  
2007-05-16 17:31:36.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 xen_hypervisor_res;
+static struct resource *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
-void xen_machine_kexec_register_resources(struct resource *res)
+void __init xen_machine_kexec_register_resources(struct resource *res)
        int k;

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.