zephyr/scripts/dts
Ulf Magnusson 7bb57fe71f scripts/dts: Remove confusing deepcopy() in generate_node_defines()
After lots of reverse-engineering, I understand why deepcopy() is used:

 1) Various functions defined in scripts/dts/extract/* modify the list
    of names in-place

 2) A plain list.copy() won't work when the *-names property happens to
    have a single name in it, because devicetree.py gives a string
    instead of a list in that case

Using deepcopy() to solve (2) is very confusing (especially with no
comments), because no deep copying is actually needed.

Get rid of deepcopy(), add a helper function for fetching the names, and
some comments.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-20 12:17:31 -06:00
..
extract scripts/dts: Clean up create_reduced() 2019-02-20 12:17:31 -06:00
devicetree.py scripts/dts: Remove redundant and confusing dict.get() calls 2019-02-07 10:39:37 +01:00
extract_dts_includes.py scripts/dts: Remove confusing deepcopy() in generate_node_defines() 2019-02-20 12:17:31 -06:00