alistair23-linux/drivers/of
Frank Rowand a68238a19c of: overlay: test case of two fragments adding same node
Multiple overlay fragments adding or deleting the same node is not
supported.  An attempt to do so results in an incorrect devicetree.
The node name will be munged for the second add.

After adding this patch, the unittest messages will show:

   Duplicate name in motor-1, renamed to "controller#1"
   OF: overlay: of_overlay_apply() err=0
   ### dt-test ### of_overlay_fdt_apply() expected -22, ret=0, overlay_bad_add_dup_node
   ### dt-test ### FAIL of_unittest_overlay_high_level():2419 Adding overlay 'overlay_bad_add_dup_node' failed

   ...

   ### dt-test ### end of unittest - 210 passed, 1 failed

The incorrect (munged) node name "controller#1" can be seen in the
/proc filesystem:

   $ pwd
   /proc/device-tree/testcase-data-2/substation@100/motor-1
   $ ls
   compatible    controller    controller#1  name          phandle       spin
   $ ls controller
   power_bus
   $ ls controller#1
   power_bus_emergency

Tested-by: Alan Tull <atull@kernel.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
2018-11-08 22:11:51 -08:00
..
unittest-data of: overlay: test case of two fragments adding same node 2018-11-08 22:11:51 -08:00
address.c drivers/of: Make of_io_request_and_map() "name" argument optional 2018-07-10 08:08:57 -06:00
base.c Devicetree fixes for v4.20-rc1: 2018-11-01 14:45:38 -07:00
device.c Devicetree updates for 4.20: 2018-10-26 12:09:58 -07:00
dynamic.c of: overlay: add missing of_node_get() in __of_attach_node_sysfs 2018-11-08 22:10:53 -08:00
fdt.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
fdt_address.c
irq.c iommu/of: make of_pci_map_rid() available for other devices too 2018-09-25 09:47:52 +02:00
Kconfig
kobj.c of: overlay: add missing of_node_get() in __of_attach_node_sysfs 2018-11-08 22:10:53 -08:00
Makefile
of_mdio.c of: Convert to using %pOFn instead of device_node.name 2018-09-07 11:04:41 -05:00
of_net.c
of_numa.c of: use for_each_of_cpu_node iterator 2018-09-28 14:25:58 -05:00
of_private.h of: make default address and size cells sizes private 2018-09-07 11:04:41 -05:00
of_reserved_mem.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
overlay.c of: overlay: make all pr_debug() and pr_err() messages unique 2018-11-08 22:11:39 -08:00
pdt.c
platform.c Devicetree updates for 4.20: 2018-10-26 12:09:58 -07:00
property.c
resolver.c
unittest.c of: overlay: test case of two fragments adding same node 2018-11-08 22:11:51 -08:00