]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Jan 2026 12:34:02 +0000 (13:34 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Jan 2026 16:15:03 +0000 (08:15 -0800)
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>
Link: https://patch.msgid.link/5042490.GXAFRqVoOG@rafael.j.wysocki
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ti/am65-cpsw-ethtool.c
drivers/net/ethernet/ti/cpsw_ethtool.c

index c57497074ae60d88b4f5944d3386bfc3a987ce95..98d60da7cc3bacd79eb8ef8eb16884515bdf0086 100644 (file)
@@ -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,
index bdc4db0d169c48502ce45c50b2ea85b619b9fd3f..a43f75ee269edf0ddcd655a0279d404176b41910 100644 (file)
@@ -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)