From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux PM <linux-pm@vger.kernel.org>, Jakub Kicinski <kuba@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Brian Norris <briannorris@chromium.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Siddharth Vadapalli <s-vadapalli@ti.com>,
Roger Quadros <rogerq@kernel.org>,
netdev@vger.kernel.org,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Simon Horman <horms@kernel.org>
Subject: [RESEND][PATCH v2 1/3] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
Date: Wed, 07 Jan 2026 13:34:02 +0100 [thread overview]
Message-ID: <5042490.GXAFRqVoOG@rafael.j.wysocki> (raw)
In-Reply-To: <2816529.mvXUDI8C0e@rafael.j.wysocki>
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Printing error messages on pm_runtime_put() returning negative values
is not particularly useful.
Returning an error code from pm_runtime_put() merely means that it has
not queued up a work item to check whether or not the device can be
suspended and there are many perfectly valid situations in which that
can happen, like after writing "on" to the devices' runtime PM "control"
attribute in sysfs for one example.
Accordingly, update am65_cpsw_ethtool_op_begin() and cpsw_ethtool_op_begin()
to simply discard the return value of pm_runtime_put().
This will facilitate a planned change of the pm_runtime_put() return
type to void in the future.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
v1 -> v2: No changes
---
drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 5 +----
drivers/net/ethernet/ti/cpsw_ethtool.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c
index c57497074ae6..98d60da7cc3b 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c
@@ -391,11 +391,8 @@ static int am65_cpsw_ethtool_op_begin(struct net_device *ndev)
static void am65_cpsw_ethtool_op_complete(struct net_device *ndev)
{
struct am65_cpsw_common *common = am65_ndev_to_common(ndev);
- int ret;
- ret = pm_runtime_put(common->dev);
- if (ret < 0 && ret != -EBUSY)
- dev_err(common->dev, "ethtool complete failed %d\n", ret);
+ pm_runtime_put(common->dev);
}
static void am65_cpsw_get_drvinfo(struct net_device *ndev,
diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c
index bdc4db0d169c..a43f75ee269e 100644
--- a/drivers/net/ethernet/ti/cpsw_ethtool.c
+++ b/drivers/net/ethernet/ti/cpsw_ethtool.c
@@ -374,11 +374,8 @@ int cpsw_ethtool_op_begin(struct net_device *ndev)
void cpsw_ethtool_op_complete(struct net_device *ndev)
{
struct cpsw_priv *priv = netdev_priv(ndev);
- int ret;
- ret = pm_runtime_put(priv->cpsw->dev);
- if (ret < 0)
- cpsw_err(priv, drv, "ethtool complete failed %d\n", ret);
+ pm_runtime_put(priv->cpsw->dev);
}
void cpsw_get_channels(struct net_device *ndev, struct ethtool_channels *ch)
--
2.51.0
next prev parent reply other threads:[~2026-01-07 12:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6245770.lOV4Wx5bFT@rafael.j.wysocki>
2025-12-22 20:11 ` [PATCH v1 10/23] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value Rafael J. Wysocki
2026-01-02 23:53 ` Jakub Kicinski
2026-01-03 21:34 ` Rafael J. Wysocki
2025-12-22 20:14 ` [PATCH v1 11/23] net: cadence: macb: " Rafael J. Wysocki
2025-12-23 8:48 ` Nicolas Ferre
2025-12-22 20:16 ` [PATCH v1 12/23] net: wan: framer: Discard pm_runtime_put() return values Rafael J. Wysocki
2026-01-03 21:23 ` [PATCH v2 1/3] net: Discard pm_runtime_put() return value Rafael J. Wysocki
2026-01-03 21:26 ` [PATCH v2 1/3] net: ethernet: ti: am65-cpsw: " Rafael J. Wysocki
2026-01-03 21:27 ` [PATCH v2 2/3] net: cadence: macb: " Rafael J. Wysocki
2026-01-03 21:29 ` [PATCH v2 3/3] net: wan: framer: Discard pm_runtime_put() return values Rafael J. Wysocki
2026-01-07 0:29 ` [PATCH v2 1/3] net: Discard pm_runtime_put() return value Jakub Kicinski
2026-01-07 12:41 ` Rafael J. Wysocki
2026-01-07 12:31 ` [RESEND][PATCH v2 0/3] " Rafael J. Wysocki
2026-01-07 12:34 ` Rafael J. Wysocki [this message]
2026-01-07 12:35 ` [RESEND][PATCH v2 2/3] net: cadence: macb: " Rafael J. Wysocki
2026-01-07 12:37 ` [RESEND][PATCH v2 3/3] net: wan: framer: Discard pm_runtime_put() return values Rafael J. Wysocki
2026-01-08 14:06 ` [RESEND][PATCH v2 0/3] net: Discard pm_runtime_put() return value Rafael J. Wysocki
2026-01-08 16:16 ` Jakub Kicinski
2026-01-08 16:20 ` 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=5042490.GXAFRqVoOG@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=briannorris@chromium.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=ulf.hansson@linaro.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