/**
  * __reserved_mem_alloc_size() - allocate reserved memory described by
- *     'size', 'align'  and 'alloc-ranges' properties.
+ *     'size', 'alignment'  and 'alloc-ranges' properties.
  */
 static int __init __reserved_mem_alloc_size(unsigned long node,
        const char *uname, phys_addr_t *res_base, phys_addr_t *res_size)
        phys_addr_t base = 0, align = 0, size;
        int len;
        const __be32 *prop;
-       int nomap;
+       bool nomap;
        int ret;
 
        prop = of_get_flat_dt_prop(node, "size", &len);
        }
        size = dt_mem_next_cell(dt_root_size_cells, &prop);
 
-       nomap = of_get_flat_dt_prop(node, "no-map", NULL) != NULL;
-
        prop = of_get_flat_dt_prop(node, "alignment", &len);
        if (prop) {
                if (len != dt_root_addr_cells * sizeof(__be32)) {
                align = dt_mem_next_cell(dt_root_addr_cells, &prop);
        }
 
+       nomap = of_get_flat_dt_prop(node, "no-map", NULL) != NULL;
+
        /* Need adjust the alignment to satisfy the CMA requirement */
        if (IS_ENABLED(CONFIG_CMA)
            && of_flat_dt_is_compatible(node, "shared-dma-pool")
            && of_get_flat_dt_prop(node, "reusable", NULL)
-           && !of_get_flat_dt_prop(node, "no-map", NULL)) {
+           && !nomap) {
                unsigned long order =
                        max_t(unsigned long, MAX_ORDER - 1, pageblock_order);
 
                int len;
                const __be32 *prop;
                int err = 0;
-               int nomap;
+               bool nomap;
 
                nomap = of_get_flat_dt_prop(node, "no-map", NULL) != NULL;
                prop = of_get_flat_dt_prop(node, "phandle", &len);