From: Jon Loeliger <jdl-CYoMK+44s/E@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: Re: Disallow re-use of the same label within a dts file
Date: Tue, 23 Feb 2010 09:06:23 -0600 [thread overview]
Message-ID: <E1NjwL9-0001iz-5s@jdl.com> (raw)
In-Reply-To: <20100223085641.GG12285@yookeroo>
> Currently, nothing will stop you from re-using the same label string
> multiple times in a dts, e.g.:
> / {
> samelabel: prop1 = "foo";
> samelabel: prop2 = "bar";
> };
>
> or
> / {
> samelabel: prop1 = "foo";
> samelabel: subnode {
> };
> };
>
> When using node references by label, this could lead to confusing
> results (with no warning), and in -Oasm mode will result in output
> which the assembler will complain about (since it too will have
> duplicate labels).
>
> This patch, therefore, adds code to checks.c to give errors if you
> attempt to re-use the same label. It treats all labels (node,
> property, and value) as residing in the same namespace, since the
> assembler will treat them so for -Oasm mode.
>
> Testcases for the new code are also added.
>
> Signed-off-by: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Applied.
prev parent reply other threads:[~2010-02-23 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-23 8:56 Disallow re-use of the same label within a dts file David Gibson
2010-02-23 15:06 ` Jon Loeliger [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=E1NjwL9-0001iz-5s@jdl.com \
--to=jdl-cyomk+44s/e@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@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