[PATCH v1 10/23] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value

Rafael J. Wysocki posted 1 patch 1 month, 2 weeks ago
drivers/net/ethernet/ti/am65-cpsw-ethtool.c |    5 +----
drivers/net/ethernet/ti/cpsw_ethtool.c      |    5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
[PATCH v1 10/23] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
Posted by Rafael J. Wysocki 1 month, 2 weeks ago
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>
---

This patch is part of a series, but it doesn't depend on anything else
in that series.  The last patch in the series depends on it.

It can be applied by itself and if you decide to do so, please let me
know.

Otherwise, an ACK or equivalent will be appreciated, but also the lack
of specific criticism will be eventually regarded as consent.

---
 drivers/net/ethernet/ti/am65-cpsw-ethtool.c |    5 +----
 drivers/net/ethernet/ti/cpsw_ethtool.c      |    5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

--- 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(st
 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,
--- 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_dev
 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)
Re: [PATCH v1 10/23] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
Posted by Jakub Kicinski 1 month ago
On Mon, 22 Dec 2025 21:11:42 +0100 Rafael J. Wysocki wrote:
> This patch is part of a series, but it doesn't depend on anything else
> in that series.  The last patch in the series depends on it.

Would you mind reposting patches 10, 11, 12 of the series as a single
set? If we get CCed only on a subset of the series PW assumes the rest
got eaten by email goblins and our CI doesn't process any of them.
Re: [PATCH v1 10/23] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
Posted by Rafael J. Wysocki 1 month ago
On Sat, Jan 3, 2026 at 12:53 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Mon, 22 Dec 2025 21:11:42 +0100 Rafael J. Wysocki wrote:
> > This patch is part of a series, but it doesn't depend on anything else
> > in that series.  The last patch in the series depends on it.
>
> Would you mind reposting patches 10, 11, 12 of the series as a single
> set? If we get CCed only on a subset of the series PW assumes the rest
> got eaten by email goblins and our CI doesn't process any of them.

Done:

https://lore.kernel.org/linux-pm/5973090.DvuYhMxLoT@rafael.j.wysocki/

and I've fixed the last patch while doing it.

Thanks!