Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /dts-v1/;
0003 /plugin/;
0004 
0005 /*
0006  * &electric_1/motor-1/electric and &spin_ctrl_1/electric are the same node:
0007  *   /testcase-data-2/substation@100/motor-1/electric
0008  *
0009  * Thus the property "rpm_avail" in each fragment will
0010  * result in an attempt to update the same property twice.
0011  * This will result in an error and the overlay apply
0012  * will fail.
0013  *
0014  * The previous version of this test did not include the extra
0015  * level of node 'electric'.  That resulted in the 'rpm_avail'
0016  * property being located in the pre-existing node 'motor-1'.
0017  * Modifying a property results in a WARNING that a memory leak
0018  * will occur if the overlay is removed.  Since the overlay apply
0019  * fails, the memory leak does actually occur, and kmemleak will
0020  * further report the memory leak if CONFIG_DEBUG_KMEMLEAK is
0021  * enabled.  Adding the overlay node 'electric' avoids the
0022  * memory leak and thus people who use kmemleak will not
0023  * have to debug this non-problem again.
0024  */
0025 
0026 &electric_1 {
0027 
0028         motor-1 {
0029                 electric {
0030                         rpm_avail = < 100 >;
0031                 };
0032         };
0033 };
0034 
0035 &spin_ctrl_1 {
0036                 electric {
0037                         rpm_avail = < 100 200 >;
0038                 };
0039 };