aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-09-29 23:04:10 +0200
committerDavid S. Miller <davem@davemloft.net>2018-10-01 22:55:35 -0700
commitab2a605fa621ecf4ec26603a237822f7772cfa28 (patch)
tree7dc31f40374d00acf6c2e232c26cbdfd14dfa9c3 /include/linux/phy.h
parentnet: phy: Move linkmode helpers to somewhere public (diff)
downloadlinux-dev-ab2a605fa621ecf4ec26603a237822f7772cfa28.tar.xz
linux-dev-ab2a605fa621ecf4ec26603a237822f7772cfa28.zip
net: phy: Add phydev_warn()
Not all new style LINK_MODE bits can be converted into old style SUPPORTED bits. We need to warn when such a conversion is attempted. Add a helper for this. Convert all pr_warn() calls to phydev_warn() where possible. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index d24cc46748e2..0ab9f89773fd 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -968,6 +968,9 @@ static inline void phy_device_reset(struct phy_device *phydev, int value)
#define phydev_err(_phydev, format, args...) \
dev_err(&_phydev->mdio.dev, format, ##args)
+#define phydev_warn(_phydev, format, args...) \
+ dev_warn(&_phydev->mdio.dev, format, ##args)
+
#define phydev_dbg(_phydev, format, args...) \
dev_dbg(&_phydev->mdio.dev, format, ##args)