On Thu, Sep 15, 2016 at 08:43:08AM -0500, Rob Herring wrote:
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.
Will do.
@@ -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.
I was trying to preserve that pr_debug output for these nodes, but I'm
also fine with skipping it.
Thanks for your feedback! I'll spin a v3 of this patchset soon.
--
Reza Arbab
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html