[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160915143157.mi7xhxfedbic6m63@arbab-laptop>
Date: Thu, 15 Sep 2016 09:31:57 -0500
From: Reza Arbab <arbab@...ux.vnet.ibm.com>
To: Rob Herring <robh+dt@...nel.org>
Cc: Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Frank Rowand <frowand.list@...il.com>,
Jonathan Corbet <corbet@....net>,
Andrew Morton <akpm@...ux-foundation.org>,
Bharata B Rao <bharata@...ux.vnet.ibm.com>,
Nathan Fontenot <nfont@...ux.vnet.ibm.com>,
Stewart Smith <stewart@...ux.vnet.ibm.com>,
Alistair Popple <apopple@....ibm.com>,
Balbir Singh <bsingharora@...il.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH v2 1/3] drivers/of: recognize status property of dt
memory nodes
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@...ux.vnet.ibm.com> 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
Powered by blists - more mailing lists