diff mbox series

fdt: don't set linux,phandle

Message ID 20220420103111.3511739-1-john@metanate.com
State Accepted
Commit 9ac4c2bfe9f502549362c6d394c7024236146a5b
Delegated to: Tom Rini
Headers show
Series fdt: don't set linux,phandle | expand

Commit Message

John Keeping April 20, 2022, 10:31 a.m. UTC
This has been deprecated for over 10 years and everything now uses the
plain "phandle" property in preference.  There's no need to set
linux,phandle when creating phandles for nodes that do not have one.

dtc changed the default to creating just phandle in version 1.4.5
released in September 2017 with the justification that the new style had
already been supported for 7 years by that point (see dtc commit 0016f8c
("dtc: change default phandles to ePAPR style instead of both")).

Signed-off-by: John Keeping <john@metanate.com>
---

 common/fdt_support.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Tom Rini May 8, 2022, 3:31 p.m. UTC | #1
On Wed, Apr 20, 2022 at 11:31:11AM +0100, John Keeping wrote:

> This has been deprecated for over 10 years and everything now uses the
> plain "phandle" property in preference.  There's no need to set
> linux,phandle when creating phandles for nodes that do not have one.
> 
> dtc changed the default to creating just phandle in version 1.4.5
> released in September 2017 with the justification that the new style had
> already been supported for 7 years by that point (see dtc commit 0016f8c
> ("dtc: change default phandles to ePAPR style instead of both")).
> 
> Signed-off-by: John Keeping <john@metanate.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/fdt_support.c b/common/fdt_support.c
index 8662bd27a4..7e9e654204 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -1544,14 +1544,6 @@  int fdt_set_phandle(void *fdt, int nodeoffset, uint32_t phandle)
 #endif
 
 	ret = fdt_setprop_cell(fdt, nodeoffset, "phandle", phandle);
-	if (ret < 0)
-		return ret;
-
-	/*
-	 * For now, also set the deprecated "linux,phandle" property, so that we
-	 * don't break older kernels.
-	 */
-	ret = fdt_setprop_cell(fdt, nodeoffset, "linux,phandle", phandle);
 
 	return ret;
 }