All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 05/11] device tree: add device_tree_for_each_node()
Date: Thu, 22 Mar 2012 12:47:33 +0000	[thread overview]
Message-ID: <4F6B1F65.9090008@citrix.com> (raw)
In-Reply-To: <1332414721.8817.67.camel@zakaz.uk.xensource.com>

On 22/03/12 11:12, Ian Campbell wrote:
> On Mon, 2012-03-19 at 17:52 +0000, David Vrabel wrote:
>> +    for ( node = 0, depth = 0;
>> +          node >=0 && depth >= 0;
>> +          node = fdt_next_node(fdt, node, &depth) )
>> +    {
>> +        if ( depth >= MAX_DEPTH )
>> +            continue;
> 
> Perhaps we should fail and return an error here (which the caller can
> log with whatever facilities are available, e.g. early_printk or
> printk)? Silently just not walking a bit of the tree seem liable to lead
> to odd errors...

Not sure about making it an error.  May be best to make it a warning as
at least in the early scan we want to try as hard as possible to get the
memory and console info so we have a better chance of printing a diagnostic.

I'm post a separate patch for this later because: a) it's unlikely a
device tree will have a depth of more than 16 (the current device tree
for the model is only 5 levels deep); and b) there is a test and a
warning message when generating dom0's device tree (so unless your
console and memory is 16 nodes deep you'll get a message).

David

  reply	other threads:[~2012-03-22 12:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 17:51 [PATCHv2 00/11] arm: pass a device tree to dom0 David Vrabel
2012-03-19 17:51 ` [PATCH 01/11] libfdt: move headers to xen/include/xen/libfdt/ David Vrabel
2012-03-19 17:58   ` David Vrabel
2012-03-19 17:52 ` [PATCH 02/11] MAINTAINERS: add device tree maintainer David Vrabel
2012-03-19 17:54   ` Keir Fraser
2012-03-19 17:52 ` [PATCH 03/11] device tree: follow coding style David Vrabel
2012-03-19 17:52 ` [PATCH 04/11] device tree: correctly ignore unit-address when matching nodes by name David Vrabel
2012-03-19 17:52 ` [PATCH 05/11] device tree: add device_tree_for_each_node() David Vrabel
2012-03-22 11:12   ` Ian Campbell
2012-03-22 12:47     ` David Vrabel [this message]
2012-03-19 17:52 ` [PATCH 06/11] device tree: add device_tree_dump() to print a flat device tree David Vrabel
2012-03-19 17:52 ` [PATCH 07/11] arm: remove the hack for loading vmlinux images David Vrabel
2012-03-19 17:52 ` [PATCH 08/11] device tree, arm: supply a flat device tree to dom0 David Vrabel
2012-03-20 10:43   ` David Vrabel
2012-03-20 10:52     ` Ian Campbell
2012-03-22 14:06   ` Ian Campbell
2012-03-22 14:27     ` David Vrabel
2012-03-22 17:12     ` David Vrabel
2012-03-19 17:52 ` [PATCH 09/11] Allow cmdline_parse() to be used with const strings David Vrabel
2012-03-19 17:54   ` Keir Fraser
2012-03-19 17:52 ` [PATCH 10/11] arm: use bootargs for the command line David Vrabel
2012-03-22 14:22   ` Ian Campbell
2012-03-22 14:30     ` Ian Campbell
2012-03-22 15:03     ` David Vrabel
2012-03-19 17:52 ` [PATCH 11/11] arm: add dom0_mem command line argument David Vrabel

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=4F6B1F65.9090008@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xensource.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 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.