From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>
Cc: devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Praneeth Bajjuri <praneeth@ti.com>,
linux-kernel@vger.kernel.org,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: [PATCH net-next v2 2/3] linux/phy.h: add phydev_err_probe() wrapper for dev_err_probe()
Date: Tue, 14 Jun 2022 10:46:11 +0200 [thread overview]
Message-ID: <20220614084612.325229-3-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20220614084612.325229-1-linux@rasmusvillemoes.dk>
The dev_err_probe() function is quite useful to avoid boilerplate
related to -EPROBE_DEFER handling. Add a phydev_err_probe() helper to
simplify making use of that from phy drivers which otherwise use the
phydev_* helpers.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
include/linux/phy.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 508f1149665b..bed9a347481b 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1539,6 +1539,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_err_probe(_phydev, err, format, args...) \
+ dev_err_probe(&_phydev->mdio.dev, err, format, ##args)
+
#define phydev_info(_phydev, format, args...) \
dev_info(&_phydev->mdio.dev, format, ##args)
--
2.31.1
next prev parent reply other threads:[~2022-06-14 8:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 20:22 [PATCH net-next 0/3] net: phy: dp83867: add binding and support for io_impedance_ctrl nvmem cell Rasmus Villemoes
2022-06-06 20:22 ` [PATCH net-next 1/3] dt-bindings: dp83867: add binding " Rasmus Villemoes
2022-06-06 21:58 ` Andrew Lunn
2022-06-07 11:54 ` Rasmus Villemoes
2022-06-14 5:40 ` Jakub Kicinski
2022-06-09 20:04 ` Rob Herring
2022-06-14 18:46 ` Andrew Lunn
2022-06-06 20:22 ` [PATCH net-next 2/3] linux/phy.h: add phydev_err_probe() wrapper for dev_err_probe() Rasmus Villemoes
2022-06-06 20:22 ` [PATCH net-next 3/3] net: phy: dp83867: implement support for io_impedance_ctrl nvmem cell Rasmus Villemoes
2022-06-14 8:46 ` [PATCH net-next v2 0/3] dt-bindings: dp83867: add binding " Rasmus Villemoes
2022-06-14 8:46 ` [PATCH net-next v2 1/3] " Rasmus Villemoes
2022-06-14 8:46 ` Rasmus Villemoes [this message]
2022-06-14 8:46 ` [PATCH net-next v2 3/3] net: phy: dp83867: implement support " Rasmus Villemoes
2022-06-17 3:50 ` [PATCH net-next v2 0/3] dt-bindings: dp83867: add binding " patchwork-bot+netdevbpf
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=20220614084612.325229-3-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=praneeth@ti.com \
--cc=robh+dt@kernel.org \
/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 NNTP newsgroup(s).