linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: phy: Use is_phy_driver() and is_phy_device()
@ 2024-01-03  2:53 Yajun Deng
  2024-01-03  2:53 ` [PATCH net-next v2 1/2] net: phy: Cleanup struct mdio_driver_common and introduce is_phy_driver() Yajun Deng
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Yajun Deng @ 2024-01-03  2:53 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni
  Cc: andrew, olteanv, hkallweit1, linux, przemyslaw.kitszel,
	rmk+kernel, kabel, netdev, linux-kernel, linux-phy, Yajun Deng

There is only one flag that can be set in struct mdio_driver_common and
mdio_device. We can compare the probe of the driver or the type of the
device to implement it. Hence, these flags in struct mdio_driver_common
and mdio_device can be removed.

Introduce is_phy_driver() and is_phy_device(). Use them test the driver
or device.

v1 -> v2:
remove redundant parens and the exported.

Yajun Deng (2):
  net: phy: Cleanup struct mdio_driver_common and introduce
    is_phy_driver()
  net: phy: Introduce is_phy_device()

 drivers/net/dsa/b53/b53_mdio.c          |  2 +-
 drivers/net/dsa/dsa_loop.c              |  2 +-
 drivers/net/dsa/lan9303_mdio.c          |  2 +-
 drivers/net/dsa/microchip/ksz8863_smi.c |  2 +-
 drivers/net/dsa/mt7530-mdio.c           |  2 +-
 drivers/net/dsa/mv88e6060.c             |  2 +-
 drivers/net/dsa/mv88e6xxx/chip.c        |  2 +-
 drivers/net/dsa/qca/ar9331.c            |  2 +-
 drivers/net/dsa/qca/qca8k-8xxx.c        |  2 +-
 drivers/net/dsa/realtek/realtek-mdio.c  |  2 +-
 drivers/net/dsa/xrs700x/xrs700x_mdio.c  |  2 +-
 drivers/net/phy/mdio_bus.c              |  7 ++--
 drivers/net/phy/mdio_device.c           | 21 +++++-------
 drivers/net/phy/phy_device.c            | 44 ++++++++++++++-----------
 drivers/net/phy/xilinx_gmii2rgmii.c     |  2 +-
 drivers/phy/broadcom/phy-bcm-ns-usb3.c  |  8 ++---
 drivers/phy/broadcom/phy-bcm-ns2-pcie.c |  8 ++---
 include/linux/mdio.h                    | 19 ++---------
 include/linux/phy.h                     | 10 +++---
 19 files changed, 62 insertions(+), 79 deletions(-)

-- 
2.25.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

end of thread, other threads:[~2024-01-04  2:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03  2:53 [PATCH net-next v2 0/2] net: phy: Use is_phy_driver() and is_phy_device() Yajun Deng
2024-01-03  2:53 ` [PATCH net-next v2 1/2] net: phy: Cleanup struct mdio_driver_common and introduce is_phy_driver() Yajun Deng
2024-01-03  2:53 ` [PATCH net-next v2 2/2] net: phy: Introduce is_phy_device() Yajun Deng
2024-01-03 13:54 ` [PATCH net-next v2 0/2] net: phy: Use is_phy_driver() and is_phy_device() Andrew Lunn
2024-01-03 14:00 ` Russell King (Oracle)
2024-01-04  2:02   ` Yajun Deng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).