All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v1 1/1] net: mdiobus: Convert to use fwnode_device_is_compatible()
@ 2023-01-19 17:50 Andy Shevchenko
  2023-01-20 10:51 ` Simon Horman
  2023-01-23 14:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-01-19 17:50 UTC (permalink / raw)
  To: Oleksij Rempel, netdev, linux-kernel
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andy Shevchenko

Replace open coded fwnode_device_is_compatible() in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/net/mdio/fwnode_mdio.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c
index b782c35c4ac1..1183ef5e203e 100644
--- a/drivers/net/mdio/fwnode_mdio.c
+++ b/drivers/net/mdio/fwnode_mdio.c
@@ -115,7 +115,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
 	struct mii_timestamper *mii_ts = NULL;
 	struct pse_control *psec = NULL;
 	struct phy_device *phy;
-	bool is_c45 = false;
+	bool is_c45;
 	u32 phy_id;
 	int rc;
 
@@ -129,11 +129,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
 		goto clean_pse;
 	}
 
-	rc = fwnode_property_match_string(child, "compatible",
-					  "ethernet-phy-ieee802.3-c45");
-	if (rc >= 0)
-		is_c45 = true;
-
+	is_c45 = fwnode_device_is_compatible(child, "ethernet-phy-ieee802.3-c45");
 	if (is_c45 || fwnode_get_phy_id(child, &phy_id))
 		phy = get_phy_device(bus, addr, is_c45);
 	else
-- 
2.39.0


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

* Re: [PATCH net-next v1 1/1] net: mdiobus: Convert to use fwnode_device_is_compatible()
  2023-01-19 17:50 [PATCH net-next v1 1/1] net: mdiobus: Convert to use fwnode_device_is_compatible() Andy Shevchenko
@ 2023-01-20 10:51 ` Simon Horman
  2023-01-23 14:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-01-20 10:51 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Oleksij Rempel, netdev, linux-kernel, Andrew Lunn,
	Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni

On Thu, Jan 19, 2023 at 07:50:10PM +0200, Andy Shevchenko wrote:
> Replace open coded fwnode_device_is_compatible() in the driver.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>

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

* Re: [PATCH net-next v1 1/1] net: mdiobus: Convert to use fwnode_device_is_compatible()
  2023-01-19 17:50 [PATCH net-next v1 1/1] net: mdiobus: Convert to use fwnode_device_is_compatible() Andy Shevchenko
  2023-01-20 10:51 ` Simon Horman
@ 2023-01-23 14:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-23 14:40 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux, netdev, linux-kernel, andrew, hkallweit1, linux, davem,
	edumazet, kuba, pabeni

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 19 Jan 2023 19:50:10 +0200 you wrote:
> Replace open coded fwnode_device_is_compatible() in the driver.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/net/mdio/fwnode_mdio.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

Here is the summary with links:
  - [net-next,v1,1/1] net: mdiobus: Convert to use fwnode_device_is_compatible()
    https://git.kernel.org/netdev/net-next/c/d408ec0b5d9a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-01-23 14:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-19 17:50 [PATCH net-next v1 1/1] net: mdiobus: Convert to use fwnode_device_is_compatible() Andy Shevchenko
2023-01-20 10:51 ` Simon Horman
2023-01-23 14:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.