]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
xen/arm: domain_build: Avoid to shadow the variable "mod" in write_properties
authorJulien Grall <julien.grall@citrix.com>
Tue, 27 Oct 2015 15:39:14 +0000 (15:39 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 3 Nov 2015 16:32:22 +0000 (16:32 +0000)
The variable "mod" is defined twice with different value. This make the
code confusing to read.

Rename the 2 "mod" in something more meaningful.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
--

Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/domain_build.c

index 0c3441a177c3ce40c5920d187dc27025ba26d207..0f0f53e2b318eee2c6dfdfdeb53c3b577b7e7185 100644 (file)
@@ -407,10 +407,10 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
     int res = 0;
     int had_dom0_bootargs = 0;
 
-    const struct bootmodule *mod = kinfo->kernel_bootmodule;
+    const struct bootmodule *kernel = kinfo->kernel_bootmodule;
 
-    if ( mod && mod->cmdline[0] )
-        bootargs = &mod->cmdline[0];
+    if ( kernel && kernel->cmdline[0] )
+        bootargs = &kernel->cmdline[0];
 
     dt_for_each_property_node (node, prop)
     {
@@ -489,7 +489,7 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
 
     if ( dt_node_path_is_equal(node, "/chosen") )
     {
-        const struct bootmodule *mod = kinfo->initrd_bootmodule;
+        const struct bootmodule *initrd = kinfo->initrd_bootmodule;
 
         if ( bootargs )
         {
@@ -503,7 +503,7 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
          * If the bootloader provides an initrd, we must create a placeholder
          * for the initrd properties. The values will be replaced later.
          */
-        if ( mod && mod->size )
+        if ( initrd && initrd->size )
         {
             u64 a = 0;
             res = fdt_property(kinfo->fdt, "linux,initrd-start", &a, sizeof(a));