Skip to contentSkip to conversation

net: dsa: qca8k: Use of_property_present() for non-boolean properties

PATCH Applied Rob Herring (Arm) 3 participants 3 messages Jan 9, 2025 – Jan 10, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: qca8k: Use of_property_present() for non-boolean properties

The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence.

---
 drivers/net/dsa/qca/qca8k-8xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/qca/qca8k-8xxx.c +1 -1
index 2d56a8152420..750fc76a6e11 100644
@@ -1019,7 +1019,7 @@ qca8k_setup_mdio_bus(struct qca8k_priv *priv)
 
 		of_get_phy_mode(port, &mode);
 
-		if (of_property_read_bool(port, "phy-handle") &&
+		if (of_property_present(port, "phy-handle") &&
 		    mode != PHY_INTERFACE_MODE_INTERNAL)
 			external_mdio_mask |= BIT(reg);
 		else
Signature · 1 line
2.45.2
#2 lore raw
In reply to Rob Herring (Arm)
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 8 lines · On Thu, 9 Jan 2025 12:21:17 -0600 you wrote:

The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence.

---
 drivers/net/dsa/qca/qca8k-8xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [net-next] net: dsa: qca8k: Use of_property_present() for non-boolean properties

    https://git.kernel.org/netdev/net-next/c/9007d911f6d2

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html