From 26f981f295d00351b6f0c69b5317b254b2361cc0 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 19 May 2022 11:10:43 +0200 Subject: fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ Asking if the alias we found actually points at the device tree node we passed in (in the guise of its offset from blob) can be done simply by asking if the fdt_path_offset() of the alias' path is identical to offset. In fact, the current method suffers from the possibility of false negatives: dtc does not necessarily emit a phandle property for a node just because it is referenced in /aliases; it only emits a phandle property for a node if it is referenced in somewhere. So if both the node we passed in and the alias node we're considering don't have phandles, fdt_get_phandle() returns 0 for both. Since the proper check is so simple, there's no reason to hide that behind a config option (and if one really wanted that, it should be called something else because there's no need to involve phandle in the check). Signed-off-by: Rasmus Villemoes Acked-by: Aswath Govindraju --- lib/Kconfig | 7 ------- 1 file changed, 7 deletions(-) (limited to 'lib/Kconfig') diff --git a/lib/Kconfig b/lib/Kconfig index acc0ac081a4..884569f9b15 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -958,11 +958,4 @@ config LMB_RESERVED_REGIONS Define the number of supported reserved regions in the library logical memory blocks. -config PHANDLE_CHECK_SEQ - bool "Enable phandle check while getting sequence number" - help - When there are multiple device tree nodes with same name, - enable this config option to distinguish them using - phandles in fdtdec_get_alias_seq() function. - endmenu -- cgit v1.3.1