Re: [PATCH v2 1/3] drivers/of: recognize status property of dt memory nodes

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

 



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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]