From: puneet saxena <puneets@nvidia.com>
To: Thierry Reding <treding@nvidia.com>
Cc: pantelis.antoniou@konsulko.com, frowand.list@gmail.com,
devicetree@vger.kernel.org, vdumpa@nvidia.com, snikam@nvidia.com
Subject: Re: [PATCH] of: resered-memory: ignore disabled memory-region nodes
Date: Wed, 22 May 2019 12:51:10 +0530 [thread overview]
Message-ID: <2f89938b-7795-3d93-b23f-4eca2b678483@nvidia.com> (raw)
In-Reply-To: <20190522063812.GA24329@ulmo>
Yes, of_device_is_available() will work here. Will incorporate in next PS.
Thanks.
On 22/05/19 12:08 PM, Thierry Reding wrote:
> On Wed, May 22, 2019 at 11:05:53AM +0530, Puneet Saxena wrote:
>> From: Krishna Reddy <vdumpa@nvidia.com>
>>
>> Ignore disabled nodes in the memory-region nodes list and continue
>> to initialize the rest of enabled nodes.
>>
>> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
>> ---
>> drivers/of/of_reserved_mem.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
>> index 1977ee0adcb1..58d95d774e3b 100644
>> --- a/drivers/of/of_reserved_mem.c
>> +++ b/drivers/of/of_reserved_mem.c
>> @@ -314,6 +314,7 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
>> struct device_node *target;
>> struct reserved_mem *rmem;
>> int ret;
>> + const char *status;
>>
>> if (!np || !dev)
>> return -EINVAL;
>> @@ -322,6 +323,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
>> if (!target)
>> return -ENODEV;
>>
>> + status = of_get_property(target, "status", NULL);
>> + if (status && strcmp(status, "okay") != 0 && strcmp(status, "ok") != 0)
>> + return 0;
>> +
> Does of_device_is_available() not work? Other than that, looks fine to
> me.
>
> Thierry
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
prev parent reply other threads:[~2019-05-22 7:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 5:35 [PATCH] ignore disabled memory-region nodes Puneet Saxena
2019-05-22 5:35 ` [PATCH] of: resered-memory: " Puneet Saxena
2019-05-22 6:38 ` Thierry Reding
2019-05-22 7:21 ` puneet saxena [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2f89938b-7795-3d93-b23f-4eca2b678483@nvidia.com \
--to=puneets@nvidia.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=pantelis.antoniou@konsulko.com \
--cc=snikam@nvidia.com \
--cc=treding@nvidia.com \
--cc=vdumpa@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox