linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* dtc: Reinstate full old-style reference-to-path for v0 dts files
@ 2007-12-07  3:38 David Gibson
  2007-12-07  3:39 ` Josh Boyer
  0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2007-12-07  3:38 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

Commit 7c44c2f9cb1cc2df7aacd13decfc4e64b73d1730 broke backwards
compatibility more badly than I realised.  Contrary to what I thought
there are in-kernel, in-use dts files which relied on
references-to-path with paths including a comma, which no longer
compile after that commit.

So, this patch reinstates full support for bare references-to-path in
dts-v0 input.  This means there will be some rather surprising lexical
corner cases when using path-expanded references in v0 files.  But,
since path-expanded references are new, v0 files shouldn't typically
be using them anyway.  If the corner cases cause a problem, you can
always convert to dts-v1 which handles the lexical issues here more
nicely.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Index: dtc/dtc-lexer.l
===================================================================
--- dtc.orig/dtc-lexer.l	2007-12-07 14:22:19.000000000 +1100
+++ dtc/dtc-lexer.l	2007-12-07 14:32:04.000000000 +1100
@@ -27,7 +27,6 @@
 
 PROPNODECHAR	[a-zA-Z0-9,._+*#?@-]
 PATHCHAR	({PROPNODECHAR}|[/])
-LEGACYPATHCHAR	[a-zA-Z0-9_@/]
 LABEL		[a-zA-Z_][a-zA-Z0-9_]*
 
 %{
@@ -158,7 +157,7 @@ static int dts_version; /* = 0 */
 			return DT_REF;
 		}
 
-<INITIAL>"&/"{LEGACYPATHCHAR}+ {	/* old-style path reference */
+<INITIAL>"&/"{PATHCHAR}+ {	/* old-style path reference */
 			yylloc.filenum = srcpos_filenum;
 			yylloc.first_line = yylineno;
 			DPRINT("Ref: %s\n", yytext+1);

-- 
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dtc: Reinstate full old-style reference-to-path for v0 dts files
  2007-12-07  3:38 dtc: Reinstate full old-style reference-to-path for v0 dts files David Gibson
@ 2007-12-07  3:39 ` Josh Boyer
  2007-12-07  4:16   ` David Gibson
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Boyer @ 2007-12-07  3:39 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

On Fri, 7 Dec 2007 14:38:26 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:

> Commit 7c44c2f9cb1cc2df7aacd13decfc4e64b73d1730 broke backwards
> compatibility more badly than I realised.  Contrary to what I thought
> there are in-kernel, in-use dts files which relied on
> references-to-path with paths including a comma, which no longer
> compile after that commit.

There won't be shortly.  I'm reworking them anyway.

josh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dtc: Reinstate full old-style reference-to-path for v0 dts files
  2007-12-07  3:39 ` Josh Boyer
@ 2007-12-07  4:16   ` David Gibson
  0 siblings, 0 replies; 3+ messages in thread
From: David Gibson @ 2007-12-07  4:16 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

On Thu, Dec 06, 2007 at 09:39:28PM -0600, Josh Boyer wrote:
> On Fri, 7 Dec 2007 14:38:26 +1100
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > Commit 7c44c2f9cb1cc2df7aacd13decfc4e64b73d1730 broke backwards
> > compatibility more badly than I realised.  Contrary to what I thought
> > there are in-kernel, in-use dts files which relied on
> > references-to-path with paths including a comma, which no longer
> > compile after that commit.
> 
> There won't be shortly.  I'm reworking them anyway.

I know, but I'd prefer that there was a broken range of dtc versions
than a broken range of kernel versions.

-- 
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-07  4:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-07  3:38 dtc: Reinstate full old-style reference-to-path for v0 dts files David Gibson
2007-12-07  3:39 ` Josh Boyer
2007-12-07  4:16   ` David Gibson

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).