dgibson / dtc

Device Tree Compiler
235 stars 134 forks source link

libfdt: overlay: Refactor overlay_fixup_phandle and update test case #132

Closed Drupping closed 7 months ago

Drupping commented 8 months ago

This commit makes two main changes:

  1. Refactored overlay_fixup_phandle to optimize efficiency by moving the phandle lookup logic based on label outside the overlay_fixup_one_phandle call. This avoids redundant phandle lookups when a single label is associated with multiple modifications.

  2. Updated the test case for overlay_bad_fixup. Changed the target DTS from overlay_base_no_symbols.test.dtb to overlay_base_manual_symbols.test.dtb. This ensures that the test case doesn't exit prematurely due to the absence of label-linked phandle in the symbols node. The update guarantees that the test case appropriately checks the validity of the fixup string linked to the label, as intended.

dgibson commented 7 months ago

Thanks for the clarifications. I've now merged this - I reversed the order of the two patches so that there isn't a temporary test failure when bisecting.