devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH] dtc: check for duplicate labels when they are defined
Date: Tue, 3 Apr 2012 12:46:34 +1000	[thread overview]
Message-ID: <20120403024634.GG7481@truffala.fritz.box> (raw)
In-Reply-To: <1332905984-2130-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>

On Tue, Mar 27, 2012 at 09:39:44PM -0600, Stephen Warren wrote:
> Currently, the DT is checked for duplicate labels after the entire DT has
> been parsed. However, once parts of the DT can be deleted, some entities
> with labels may have been deleted by this time, thus making those labels
> invisible to the duplicate label check, which can then lead to false
> negatives.
> 
> Instead, maintain a list of all known labels, from which entries are
> never deleted, and check against this list for duplicates when adding
> labels.
> 
> Signed-off-by: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
> ---
> This patch should be applied before my previously posted "dtc: Add
> ability to delete nodes and properties". I believe it addresses David's
> concerns with that patch re: the assumption that labels are
> immutable.

Hm, I suppose it does.  Or at least it removes the more complex
objections.  I'd still want to relook at the deletion patch to
convince myself that the syntax is as good as we can reasonably make
it.

This patch is a bit of a hack, and I'm not thrilled at the loss of
information from the error message, but I can live wth it.

The other approach I was thinking of, which is hacky in different
ways, would be to change the deletion patch so that instead of
actually removing the deleted nodes from the tree, just marks them as
deleted.  They'd then be omitted from the output pass, but the labels
attached therein can still be found.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  parent reply	other threads:[~2012-04-03  2:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28  3:39 [PATCH] dtc: check for duplicate labels when they are defined Stephen Warren
     [not found] ` <1332905984-2130-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-03  2:46   ` David Gibson [this message]
     [not found]     ` <20120403024634.GG7481-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-05-14 18:40       ` Stephen Warren

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=20120403024634.GG7481@truffala.fritz.box \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).