mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/of: fdt: Make ibm,phandle logic only happen on pseries
@ 2026-06-03 15:18 Daniel Palmer
  2026-06-03 22:16 ` Rob Herring (Arm)
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Palmer @ 2026-06-03 15:18 UTC (permalink / raw)
  To: robh, saravanak; +Cc: devicetree, linux-kernel, Daniel Palmer

The "ibm,phandle" thing only seems to be needed on pseries
machines but everyone gets it so they get a string and a little
bit of useless code.

In __of_attach_node() the pseries specific part uses
IS_ENABLED(CONFIG_PPC_PSERIES) so do that here too.

Signed-off-by: Daniel Palmer <daniel@thingy.jp>
---
 drivers/of/fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 82f7327c59ea..2260a7c0c494 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -145,7 +145,7 @@ static void populate_properties(const void *blob,
 		 * used in pSeries dynamic device tree
 		 * stuff
 		 */
-		if (!strcmp(pname, "ibm,phandle"))
+		if (IS_ENABLED(CONFIG_PPC_PSERIES) && !strcmp(pname, "ibm,phandle"))
 			np->phandle = be32_to_cpup(val);
 
 		pp->name   = (char *)pname;
-- 
2.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers/of: fdt: Make ibm,phandle logic only happen on pseries
  2026-06-03 15:18 [PATCH] drivers/of: fdt: Make ibm,phandle logic only happen on pseries Daniel Palmer
@ 2026-06-03 22:16 ` Rob Herring (Arm)
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring (Arm) @ 2026-06-03 22:16 UTC (permalink / raw)
  To: Daniel Palmer; +Cc: saravanak, linux-kernel, devicetree


On Thu, 04 Jun 2026 00:18:09 +0900, Daniel Palmer wrote:
> The "ibm,phandle" thing only seems to be needed on pseries
> machines but everyone gets it so they get a string and a little
> bit of useless code.
> 
> In __of_attach_node() the pseries specific part uses
> IS_ENABLED(CONFIG_PPC_PSERIES) so do that here too.
> 
> Signed-off-by: Daniel Palmer <daniel@thingy.jp>
> ---
>  drivers/of/fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks!


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-03 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-03 15:18 [PATCH] drivers/of: fdt: Make ibm,phandle logic only happen on pseries Daniel Palmer
2026-06-03 22:16 ` Rob Herring (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®