[PATCH v2 08/11] net: phy: add deprecation warning to phy_{read,write,modify}_mmd_indirect

Marco Felsch m.felsch at pengutronix.de
Fri Aug 11 03:26:54 PDT 2023


Add deprecation warnings and point to the new APIs user should use
instead.

Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
---
v2:
- new patch

 drivers/net/phy/phy.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 4cabb436e461..ad02732ff93b 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -850,6 +850,9 @@ int phy_read_mmd_indirect(struct phy_device *phydev, int prtad, int devad)
 {
 	u32 ret;
 
+	phydev_warn(phydev, "%s is deprectated use phy_read_mmd instead\n",
+		    __func__);
+
 	mmd_phy_indirect(phydev, devad, prtad);
 
 	/* Read the content of the MMD's selected register */
@@ -876,6 +879,9 @@ int phy_read_mmd_indirect(struct phy_device *phydev, int prtad, int devad)
 void phy_write_mmd_indirect(struct phy_device *phydev, int prtad, int devad,
 				   u16 data)
 {
+	phydev_warn(phydev, "%s is deprectated use phy_write_mmd instead\n",
+		    __func__);
+
 	mmd_phy_indirect(phydev, devad, prtad);
 
 	/* Write the data into MMD's selected register */
@@ -896,6 +902,9 @@ int phy_modify_mmd_indirect(struct phy_device *phydev, int prtad, int devad,
 {
 	int ret;
 
+	phydev_warn(phydev, "%s is deprectated use phy_modify_mmd instead\n",
+		    __func__);
+
 	ret = phy_read_mmd_indirect(phydev, prtad, devad);
 	if (ret < 0)
 		return ret;
-- 
2.39.2




More information about the barebox mailing list