On Wed, Sep 14, 2016 at 3:06 PM, Reza Arbab <arbab@xxxxxxxxxxxxxxxxxx> wrote:
+ status = of_get_flat_dt_prop(node, "status", NULL);
+ add_memory = !status || !strcmp(status, "okay");
Move this into it's own function to mirror the unflattened version
(of_device_is_available). Also, make sure the logic is the same. IIRC,
"ok" is also allowed.
@@ -1057,6 +1062,9 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
pr_debug(" - %llx , %llx\n", (unsigned long long)base,
(unsigned long long)size);
+ if (!add_memory)
+ continue;
There's no point in checking this in the loop. status applies to the
whole node. Just return up above.