Linux-PHY Archive mirror
 help / color / mirror / Atom feed
From: Yajun Deng <yajun.deng@linux.dev>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com
Cc: andrew@lunn.ch, olteanv@gmail.com, hkallweit1@gmail.com,
	linux@armlinux.org.uk, przemyslaw.kitszel@intel.com,
	rmk+kernel@armlinux.org.uk, kabel@kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-phy@lists.infradead.org, Yajun Deng <yajun.deng@linux.dev>
Subject: [PATCH net-next v2 0/2] net: phy: Use is_phy_driver() and is_phy_device()
Date: Wed,  3 Jan 2024 10:53:32 +0800	[thread overview]
Message-ID: <20240103025334.541682-1-yajun.deng@linux.dev> (raw)

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

             reply	other threads:[~2024-01-03  2:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03  2:53 Yajun Deng [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240103025334.541682-1-yajun.deng@linux.dev \
    --to=yajun.deng@linux.dev \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kabel@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=rmk+kernel@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).