From: Thierry Reding <treding@nvidia.com>
To: Puneet Saxena <puneets@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 08:38:14 +0200 [thread overview]
Message-ID: <20190522063812.GA24329@ulmo> (raw)
In-Reply-To: <1558503353-13179-2-git-send-email-puneets@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-05-22 6:38 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 [this message]
2019-05-22 7:21 ` puneet saxena
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=20190522063812.GA24329@ulmo \
--to=treding@nvidia.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=pantelis.antoniou@konsulko.com \
--cc=puneets@nvidia.com \
--cc=snikam@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