Commit 5e28971
committed
edtlib: fix phandle edge circular dependency
Added is_child helper to skip phandle
dependency edges when the target is a descendent
of the source node. This fixes a circular dependency
that can occur when the dependency graph is built
using tree edges (child depends on parent) and
phandle edges (node - phandle target).
i.e. (parent depends on child).
When a parent references its own children using
phandles, this circular dependency graph becomes
problematic. The tree structure must always have a
parent before child ordering. Since every parent
already contains its child, skipping the edge
addition is appropriate in this scenario.
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>1 parent 94c34fd commit 5e28971
1 file changed
+22
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2401 | 2401 | | |
2402 | 2402 | | |
2403 | 2403 | | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
2404 | 2418 | | |
2405 | 2419 | | |
2406 | | - | |
2407 | | - | |
2408 | | - | |
2409 | | - | |
2410 | | - | |
2411 | | - | |
2412 | | - | |
2413 | | - | |
2414 | | - | |
2415 | | - | |
2416 | | - | |
2417 | | - | |
2418 | | - | |
2419 | | - | |
2420 | | - | |
2421 | | - | |
2422 | | - | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
2423 | 2424 | | |
2424 | 2425 | | |
2425 | 2426 | | |
2426 | 2427 | | |
2427 | | - | |
| 2428 | + | |
| 2429 | + | |
2428 | 2430 | | |
2429 | 2431 | | |
2430 | 2432 | | |
| |||
2433 | 2435 | | |
2434 | 2436 | | |
2435 | 2437 | | |
2436 | | - | |
| 2438 | + | |
| 2439 | + | |
2437 | 2440 | | |
2438 | 2441 | | |
2439 | 2442 | | |
| |||
0 commit comments