From: shannon.zhao@linaro.org (Shannon Zhao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: ACPI: Fix the helper which checks if only a /chosen node
Date: Thu, 05 Nov 2015 22:22:05 +0800 [thread overview]
Message-ID: <563B660D.4010207@linaro.org> (raw)
In-Reply-To: <CAKv+Gu-EJxogB29vXM-G_KYjHYzXFEzgWX3f=E=3=QVGcRXJaA@mail.gmail.com>
On 2015/11/5 21:59, Ard Biesheuvel wrote:
> On 5 November 2015 at 13:56, Shannon Zhao <zhaoshenglong@huawei.com> wrote:
>> From: Shannon Zhao <shannon.zhao@linaro.org>
>>
>> Assuming that there are several other nodes and a /chosen node in a DTS
>> and the /chosen node is last node, of_scan_flat_dt() will return 0
>
> If those 'several other nodes' are not all subnodes of /chosen, at
> least one of them will be at depth 1, right? Could you give an example
> DTS where this goes wrong?
>
>> while
>> we expect it returns 1 when it's used to call a function to check if
>> there is only a /chosen node in DTS.
>>
>
> of_scan_flat_dt() will terminate early and return 1 on the first
> occasion that the callback returns 1. The callback returns 1 if it
> encounters a node at depth 1 whose name is not 'chosen'. So I am
> failing to see how this code is broken.
>
Oh, I didn't see the !rc within the for() loop before. Sorry for the noise.
--
Shannon
prev parent reply other threads:[~2015-11-05 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 12:56 [PATCH] ARM: ACPI: Fix the helper which checks if only a /chosen node Shannon Zhao
2015-11-05 13:59 ` Ard Biesheuvel
2015-11-05 14:22 ` Shannon Zhao [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=563B660D.4010207@linaro.org \
--to=shannon.zhao@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.