All of lore.kernel.org
 help / color / mirror / Atom feed
* Duplicate labels in dts files
@ 2012-05-18 21:01 Stephen Warren
  2012-05-19  2:56 ` Shawn Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2012-05-18 21:01 UTC (permalink / raw)
  To: linux-arm-kernel

The following arch/arm/boot/dts/*.dts all have duplicate label
definitions, albeit all duplicates pointing at the same node. Is this
expected? This does work OK with the in-kernel dtc and latest mainline
dtc, but triggered some error-checks in a dtc patch that I have locally,
which allows node/property deletion. I think the duplicate labels should
probably be removed - do you agree?

at91sam9g25ek.dts
label: nand0
defined at at91sam9x5.dtsi:233
defined at at91sam9x5cm.dtsi:27

imx53-ard.dts
label: uart1
defined at imx53.dtsi:185
defined at imx53-ard.dts:43

imx6q-sabresd.dts
label: uart1
defined at imx6q.dtsi:168
defined at imx6q-sabresd.dts:28

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

* Duplicate labels in dts files
  2012-05-18 21:01 Duplicate labels in dts files Stephen Warren
@ 2012-05-19  2:56 ` Shawn Guo
  2012-05-21  9:58   ` Nicolas Ferre
  2012-05-21 16:29   ` Stephen Warren
  0 siblings, 2 replies; 4+ messages in thread
From: Shawn Guo @ 2012-05-19  2:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 18, 2012 at 03:01:10PM -0600, Stephen Warren wrote:
> The following arch/arm/boot/dts/*.dts all have duplicate label
> definitions, albeit all duplicates pointing at the same node. Is this
> expected?

At least for IMX, I would say, yes.

For example, when I have the following node in imx53.dtsi and need to
have it in imx53-ard.dts, the first line of the node definition will
be naturally copied into imx53-ard.dts.  As the result, the label
"uart1" will be "duplicated".

	uart1: serial at 53fbc000 {
		...
	};

> This does work OK with the in-kernel dtc and latest mainline
> dtc, but triggered some error-checks in a dtc patch that I have locally,
> which allows node/property deletion. I think the duplicate labels should
> probably be removed - do you agree?
> 
I hardly think so.  You probably would agree that we shouldn't say
the node is duplicated, since the node will still be one in dtb.
Then, as long as the label points to the same node, we should not say
the label is duplicated either.

-- 
Regards,
Shawn

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

* Duplicate labels in dts files
  2012-05-19  2:56 ` Shawn Guo
@ 2012-05-21  9:58   ` Nicolas Ferre
  2012-05-21 16:29   ` Stephen Warren
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Ferre @ 2012-05-21  9:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/19/2012 04:56 AM, Shawn Guo :
> On Fri, May 18, 2012 at 03:01:10PM -0600, Stephen Warren wrote:
>> The following arch/arm/boot/dts/*.dts all have duplicate label
>> definitions, albeit all duplicates pointing at the same node. Is this
>> expected?
> 
> At least for IMX, I would say, yes.
> 
> For example, when I have the following node in imx53.dtsi and need to
> have it in imx53-ard.dts, the first line of the node definition will
> be naturally copied into imx53-ard.dts.  As the result, the label
> "uart1" will be "duplicated".
> 
> 	uart1: serial at 53fbc000 {
> 		...
> 	};

Well, for AT91, I would say it is intended.
As explained by Shawn, The node definition is simply copied.

>> This does work OK with the in-kernel dtc and latest mainline
>> dtc, but triggered some error-checks in a dtc patch that I have locally,
>> which allows node/property deletion. I think the duplicate labels should
>> probably be removed - do you agree?
>>
> I hardly think so.  You probably would agree that we shouldn't say
> the node is duplicated, since the node will still be one in dtb.
> Then, as long as the label points to the same node, we should not say
> the label is duplicated either.

I agree with Shawn: If the node definition is not copied literally
(including the label), I fear that DT newbies will not understand the
meaning of this. Moreover, it would be harder to manage includes and
nodes definitions (while creating a board file out of a SoC file for
example).

So, please keep the in-kernel dtc behavior.

Best regards,
-- 
Nicolas Ferre

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

* Duplicate labels in dts files
  2012-05-19  2:56 ` Shawn Guo
  2012-05-21  9:58   ` Nicolas Ferre
@ 2012-05-21 16:29   ` Stephen Warren
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2012-05-21 16:29 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/18/2012 08:56 PM, Shawn Guo wrote:
> On Fri, May 18, 2012 at 03:01:10PM -0600, Stephen Warren wrote:
>> The following arch/arm/boot/dts/*.dts all have duplicate label
>> definitions, albeit all duplicates pointing at the same node. Is this
>> expected?
> 
> At least for IMX, I would say, yes.
> 
> For example, when I have the following node in imx53.dtsi and need to
> have it in imx53-ard.dts, the first line of the node definition will
> be naturally copied into imx53-ard.dts.  As the result, the label
> "uart1" will be "duplicated".
> 
> 	uart1: serial at 53fbc000 {

There's no need to duplicate the label here; that line would work just
fine as:

	serial at 53fbc000 {

Writing that doesn't remove the label from the node at all.

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

end of thread, other threads:[~2012-05-21 16:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 21:01 Duplicate labels in dts files Stephen Warren
2012-05-19  2:56 ` Shawn Guo
2012-05-21  9:58   ` Nicolas Ferre
2012-05-21 16:29   ` Stephen Warren

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.