* [PATCH v1 10/23] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
[not found] <6245770.lOV4Wx5bFT@rafael.j.wysocki>
@ 2025-12-22 20:11 ` Rafael J. Wysocki
2026-01-02 23:53 ` Jakub Kicinski
2025-12-22 20:14 ` [PATCH v1 11/23] net: cadence: macb: " Rafael J. Wysocki
` (3 subsequent siblings)
4 siblings, 1 reply; 16+ messages in thread
From: Rafael J. Wysocki @ 2025-12-22 20:11 UTC (permalink / raw)
To: Linux PM
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Siddharth Vadapalli,
Roger Quadros, netdev
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)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v1 11/23] net: cadence: macb: Discard pm_runtime_put() return value
[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
@ 2025-12-22 20:14 ` 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
` (2 subsequent siblings)
4 siblings, 1 reply; 16+ messages in thread
From: Rafael J. Wysocki @ 2025-12-22 20:14 UTC (permalink / raw)
To: Linux PM
Cc: LKML, Ulf Hansson, Brian Norris, Nicolas Ferre, Claudiu Beznea,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Passing pm_runtime_put() return value to the callers 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. It also happens when the kernel is
configured with CONFIG_PM unset.
Accordingly, update at91ether_close() to simply discard the return
value of pm_runtime_put() and always return success to the caller.
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/cadence/macb_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4837,7 +4837,9 @@ static int at91ether_close(struct net_de
at91ether_stop(lp);
- return pm_runtime_put(&lp->pdev->dev);
+ pm_runtime_put(&lp->pdev->dev);
+
+ return 0;
}
/* Transmit packet */
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v1 12/23] net: wan: framer: Discard pm_runtime_put() return values
[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
2025-12-22 20:14 ` [PATCH v1 11/23] net: cadence: macb: " Rafael J. Wysocki
@ 2025-12-22 20:16 ` Rafael J. Wysocki
2026-01-03 21:23 ` [PATCH v2 1/3] net: Discard pm_runtime_put() return value Rafael J. Wysocki
2026-01-07 12:31 ` [RESEND][PATCH v2 0/3] " Rafael J. Wysocki
4 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2025-12-22 20:16 UTC (permalink / raw)
To: Linux PM
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman, netdev
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
The framer driver defines framer_pm_runtime_put() to return an int,
but that return value is never used. It also passes the return value
of pm_runtime_put() to the caller which is not very 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.
Modify phy_pm_runtime_put() to discard the pm_runtime_put() return
value and change its return type to void.
No intentional functional impact.
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/wan/framer/framer-core.c | 7 ++-----
include/linux/framer/framer.h | 5 ++---
2 files changed, 4 insertions(+), 8 deletions(-)
--- a/drivers/net/wan/framer/framer-core.c
+++ b/drivers/net/wan/framer/framer-core.c
@@ -60,12 +60,9 @@ int framer_pm_runtime_get_sync(struct fr
}
EXPORT_SYMBOL_GPL(framer_pm_runtime_get_sync);
-int framer_pm_runtime_put(struct framer *framer)
+void framer_pm_runtime_put(struct framer *framer)
{
- if (!pm_runtime_enabled(&framer->dev))
- return -EOPNOTSUPP;
-
- return pm_runtime_put(&framer->dev);
+ pm_runtime_put(&framer->dev);
}
EXPORT_SYMBOL_GPL(framer_pm_runtime_put);
--- a/include/linux/framer/framer.h
+++ b/include/linux/framer/framer.h
@@ -96,7 +96,7 @@ struct framer {
#if IS_ENABLED(CONFIG_GENERIC_FRAMER)
int framer_pm_runtime_get(struct framer *framer);
int framer_pm_runtime_get_sync(struct framer *framer);
-int framer_pm_runtime_put(struct framer *framer);
+void framer_pm_runtime_put(struct framer *framer);
int framer_pm_runtime_put_sync(struct framer *framer);
int framer_init(struct framer *framer);
int framer_exit(struct framer *framer);
@@ -124,9 +124,8 @@ static inline int framer_pm_runtime_get_
return -ENOSYS;
}
-static inline int framer_pm_runtime_put(struct framer *framer)
+static inline void framer_pm_runtime_put(struct framer *framer)
{
- return -ENOSYS;
}
static inline int framer_pm_runtime_put_sync(struct framer *framer)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v1 11/23] net: cadence: macb: Discard pm_runtime_put() return value
2025-12-22 20:14 ` [PATCH v1 11/23] net: cadence: macb: " Rafael J. Wysocki
@ 2025-12-23 8:48 ` Nicolas Ferre
0 siblings, 0 replies; 16+ messages in thread
From: Nicolas Ferre @ 2025-12-23 8:48 UTC (permalink / raw)
To: Rafael J. Wysocki, Linux PM
Cc: LKML, Ulf Hansson, Brian Norris, Claudiu Beznea, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev
On 22/12/2025 at 21:14, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Passing pm_runtime_put() return value to the callers 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. It also happens when the kernel is
> configured with CONFIG_PM unset.
>
> Accordingly, update at91ether_close() to simply discard the return
> value of pm_runtime_put() and always return success to the caller.
>
> 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.
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Ok to take whichever route you choose, with a preference in staying with
the other patches of the batch.
Thanks, regards,
Nicolas
> ---
> drivers/net/ethernet/cadence/macb_main.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4837,7 +4837,9 @@ static int at91ether_close(struct net_de
>
> at91ether_stop(lp);
>
> - return pm_runtime_put(&lp->pdev->dev);
> + pm_runtime_put(&lp->pdev->dev);
> +
> + return 0;
> }
>
> /* Transmit packet */
>
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v1 10/23] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
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
0 siblings, 1 reply; 16+ messages in thread
From: Jakub Kicinski @ 2026-01-02 23:53 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM, LKML, Ulf Hansson, Brian Norris, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, Siddharth Vadapalli,
Roger Quadros, netdev
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.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/3] net: Discard pm_runtime_put() return value
[not found] <6245770.lOV4Wx5bFT@rafael.j.wysocki>
` (2 preceding siblings ...)
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 ` Rafael J. Wysocki
2026-01-03 21:26 ` [PATCH v2 1/3] net: ethernet: ti: am65-cpsw: " Rafael J. Wysocki
` (3 more replies)
2026-01-07 12:31 ` [RESEND][PATCH v2 0/3] " Rafael J. Wysocki
4 siblings, 4 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-03 21:23 UTC (permalink / raw)
To: Linux PM, Jakub Kicinski
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Siddharth Vadapalli, Roger Quadros,
netdev, Nicolas Ferre, Claudiu Beznea, Simon Horman
Hi All,
This mostly is a resend of patches [10-12/23] from:
https://lore.kernel.org/linux-pm/6245770.lOV4Wx5bFT@rafael.j.wysocki/
as requested by Jakub, except for the last patch that has been fixed
while at it and so the version has been bumped up.
The patches are independent of each other and they are all requisite
for converting pm_runtime_put() into a void function.
Thanks!
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/3] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
2026-01-03 21:23 ` [PATCH v2 1/3] net: Discard pm_runtime_put() return value Rafael J. Wysocki
@ 2026-01-03 21:26 ` Rafael J. Wysocki
2026-01-03 21:27 ` [PATCH v2 2/3] net: cadence: macb: " Rafael J. Wysocki
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-03 21:26 UTC (permalink / raw)
To: Linux PM, Jakub Kicinski
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Siddharth Vadapalli, Roger Quadros,
netdev, Nicolas Ferre, Claudiu Beznea, Simon Horman
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
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/3] net: cadence: macb: Discard pm_runtime_put() return value
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 ` 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
3 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-03 21:27 UTC (permalink / raw)
To: Linux PM, Jakub Kicinski
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Siddharth Vadapalli, Roger Quadros,
netdev, Nicolas Ferre, Claudiu Beznea, Simon Horman
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Passing pm_runtime_put() return value to the callers 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. It also happens when the kernel is
configured with CONFIG_PM unset.
Accordingly, update at91ether_close() to simply discard the return
value of pm_runtime_put() and always return success to the caller.
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>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
v1 -> v2: Added Acked-by from Nicolas.
---
drivers/net/ethernet/cadence/macb_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index e461f5072884..1079613953bc 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4810,7 +4810,9 @@ static int at91ether_close(struct net_device *dev)
at91ether_stop(lp);
- return pm_runtime_put(&lp->pdev->dev);
+ pm_runtime_put(&lp->pdev->dev);
+
+ return 0;
}
/* Transmit packet */
--
2.51.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 3/3] net: wan: framer: Discard pm_runtime_put() return values
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 ` Rafael J. Wysocki
2026-01-07 0:29 ` [PATCH v2 1/3] net: Discard pm_runtime_put() return value Jakub Kicinski
3 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-03 21:29 UTC (permalink / raw)
To: Linux PM, Jakub Kicinski
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Siddharth Vadapalli, Roger Quadros,
netdev, Nicolas Ferre, Claudiu Beznea, Simon Horman
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
The framer driver defines framer_pm_runtime_put() to return an int,
but that return value is never used. It also passes the return value
of pm_runtime_put() to the caller which is not very 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.
Modify phy_pm_runtime_put() to discard the pm_runtime_put() return
value and change its return type to void.
No intentional functional impact.
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:
* Do not remove the pm_runtime_enabled() check from framer_pm_runtime_put()
so that it also works when runtime PM is disabled.
---
drivers/net/wan/framer/framer-core.c | 6 +++---
include/linux/framer/framer.h | 5 ++---
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wan/framer/framer-core.c b/drivers/net/wan/framer/framer-core.c
index 58f5143359df..bf7ac7dd2804 100644
--- a/drivers/net/wan/framer/framer-core.c
+++ b/drivers/net/wan/framer/framer-core.c
@@ -60,12 +60,12 @@ int framer_pm_runtime_get_sync(struct framer *framer)
}
EXPORT_SYMBOL_GPL(framer_pm_runtime_get_sync);
-int framer_pm_runtime_put(struct framer *framer)
+void framer_pm_runtime_put(struct framer *framer)
{
if (!pm_runtime_enabled(&framer->dev))
- return -EOPNOTSUPP;
+ return;
- return pm_runtime_put(&framer->dev);
+ pm_runtime_put(&framer->dev);
}
EXPORT_SYMBOL_GPL(framer_pm_runtime_put);
diff --git a/include/linux/framer/framer.h b/include/linux/framer/framer.h
index 2b85fe9e7f9a..b1e575665fc5 100644
--- a/include/linux/framer/framer.h
+++ b/include/linux/framer/framer.h
@@ -96,7 +96,7 @@ struct framer {
#if IS_ENABLED(CONFIG_GENERIC_FRAMER)
int framer_pm_runtime_get(struct framer *framer);
int framer_pm_runtime_get_sync(struct framer *framer);
-int framer_pm_runtime_put(struct framer *framer);
+void framer_pm_runtime_put(struct framer *framer);
int framer_pm_runtime_put_sync(struct framer *framer);
int framer_init(struct framer *framer);
int framer_exit(struct framer *framer);
@@ -124,9 +124,8 @@ static inline int framer_pm_runtime_get_sync(struct framer *framer)
return -ENOSYS;
}
-static inline int framer_pm_runtime_put(struct framer *framer)
+static inline void framer_pm_runtime_put(struct framer *framer)
{
- return -ENOSYS;
}
static inline int framer_pm_runtime_put_sync(struct framer *framer)
--
2.51.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v1 10/23] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
2026-01-02 23:53 ` Jakub Kicinski
@ 2026-01-03 21:34 ` Rafael J. Wysocki
0 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-03 21:34 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Rafael J. Wysocki, Linux PM, LKML, Ulf Hansson, Brian Norris,
Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni,
Siddharth Vadapalli, Roger Quadros, netdev
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!
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/3] net: Discard pm_runtime_put() return value
2026-01-03 21:23 ` [PATCH v2 1/3] net: Discard pm_runtime_put() return value Rafael J. Wysocki
` (2 preceding siblings ...)
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 ` Jakub Kicinski
2026-01-07 12:41 ` Rafael J. Wysocki
3 siblings, 1 reply; 16+ messages in thread
From: Jakub Kicinski @ 2026-01-07 0:29 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM, LKML, Ulf Hansson, Brian Norris, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, Siddharth Vadapalli,
Roger Quadros, netdev, Nicolas Ferre, Claudiu Beznea,
Simon Horman
On Sat, 03 Jan 2026 22:23:52 +0100 Rafael J. Wysocki wrote:
> Subject: [PATCH v2 1/3] net: Discard pm_runtime_put() return value
Sorry for noticing late -- looks like the subject prefix being 1/3
instead of 0/3 is throwing patchwork off. Patchwork seems to have
mis-guessed that these are the first 3 patches of the missing ones
in your full 23 patch series, instead of treating this as a fresh
posting:
https://patchwork.kernel.org/project/netdevbpf/list/?series=1035812&state=*
Could you resend one more time with the cover letter subject corrected?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [RESEND][PATCH v2 0/3] net: Discard pm_runtime_put() return value
[not found] <6245770.lOV4Wx5bFT@rafael.j.wysocki>
` (3 preceding siblings ...)
2026-01-03 21:23 ` [PATCH v2 1/3] net: Discard pm_runtime_put() return value Rafael J. Wysocki
@ 2026-01-07 12:31 ` Rafael J. Wysocki
2026-01-07 12:34 ` [RESEND][PATCH v2 1/3] net: ethernet: ti: am65-cpsw: " Rafael J. Wysocki
` (2 more replies)
4 siblings, 3 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-07 12:31 UTC (permalink / raw)
To: Linux PM, Jakub Kicinski
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Siddharth Vadapalli, Roger Quadros,
netdev, Nicolas Ferre, Claudiu Beznea, Simon Horman
Hi All,
This is a resend of
https://lore.kernel.org/linux-pm/5973090.DvuYhMxLoT@rafael.j.wysocki/
which mostly was a resend of patches [10-12/23] from:
https://lore.kernel.org/linux-pm/6245770.lOV4Wx5bFT@rafael.j.wysocki/
as requested by Jakub, except for the last patch that has been fixed
while at it and so the version has been bumped up.
The patches are independent of each other and they are all requisite
for converting pm_runtime_put() into a void function.
Thanks!
^ permalink raw reply [flat|nested] 16+ messages in thread
* [RESEND][PATCH v2 1/3] net: ethernet: ti: am65-cpsw: Discard pm_runtime_put() return value
2026-01-07 12:31 ` [RESEND][PATCH v2 0/3] " Rafael J. Wysocki
@ 2026-01-07 12:34 ` Rafael J. Wysocki
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
2 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-07 12:34 UTC (permalink / raw)
To: Linux PM, Jakub Kicinski
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Siddharth Vadapalli, Roger Quadros,
netdev, Nicolas Ferre, Claudiu Beznea, Simon Horman
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
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RESEND][PATCH v2 2/3] net: cadence: macb: Discard pm_runtime_put() return value
2026-01-07 12:31 ` [RESEND][PATCH v2 0/3] " Rafael J. Wysocki
2026-01-07 12:34 ` [RESEND][PATCH v2 1/3] net: ethernet: ti: am65-cpsw: " Rafael J. Wysocki
@ 2026-01-07 12:35 ` 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
2 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-07 12:35 UTC (permalink / raw)
To: Linux PM, Jakub Kicinski
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Siddharth Vadapalli, Roger Quadros,
netdev, Nicolas Ferre, Claudiu Beznea, Simon Horman
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Passing pm_runtime_put() return value to the callers 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. It also happens when the kernel is
configured with CONFIG_PM unset.
Accordingly, update at91ether_close() to simply discard the return
value of pm_runtime_put() and always return success to the caller.
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>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
v1 -> v2: Added Acked-by from Nicolas
---
drivers/net/ethernet/cadence/macb_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index e461f5072884..1079613953bc 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4810,7 +4810,9 @@ static int at91ether_close(struct net_device *dev)
at91ether_stop(lp);
- return pm_runtime_put(&lp->pdev->dev);
+ pm_runtime_put(&lp->pdev->dev);
+
+ return 0;
}
/* Transmit packet */
--
2.51.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RESEND][PATCH v2 3/3] net: wan: framer: Discard pm_runtime_put() return values
2026-01-07 12:31 ` [RESEND][PATCH v2 0/3] " Rafael J. Wysocki
2026-01-07 12:34 ` [RESEND][PATCH v2 1/3] net: ethernet: ti: am65-cpsw: " Rafael J. Wysocki
2026-01-07 12:35 ` [RESEND][PATCH v2 2/3] net: cadence: macb: " Rafael J. Wysocki
@ 2026-01-07 12:37 ` Rafael J. Wysocki
2 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-07 12:37 UTC (permalink / raw)
To: Linux PM, Jakub Kicinski
Cc: LKML, Ulf Hansson, Brian Norris, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Siddharth Vadapalli, Roger Quadros,
netdev, Nicolas Ferre, Claudiu Beznea, Simon Horman
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
The framer driver defines framer_pm_runtime_put() to return an int,
but that return value is never used. It also passes the return value
of pm_runtime_put() to the caller which is not very 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.
Modify phy_pm_runtime_put() to discard the pm_runtime_put() return
value and change its return type to void.
No intentional functional impact.
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:
* Do not remove the pm_runtime_enabled() check from framer_pm_runtime_put()
so that it also works when runtime PM is disabled.
---
drivers/net/wan/framer/framer-core.c | 6 +++---
include/linux/framer/framer.h | 5 ++---
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wan/framer/framer-core.c b/drivers/net/wan/framer/framer-core.c
index 58f5143359df..bf7ac7dd2804 100644
--- a/drivers/net/wan/framer/framer-core.c
+++ b/drivers/net/wan/framer/framer-core.c
@@ -60,12 +60,12 @@ int framer_pm_runtime_get_sync(struct framer *framer)
}
EXPORT_SYMBOL_GPL(framer_pm_runtime_get_sync);
-int framer_pm_runtime_put(struct framer *framer)
+void framer_pm_runtime_put(struct framer *framer)
{
if (!pm_runtime_enabled(&framer->dev))
- return -EOPNOTSUPP;
+ return;
- return pm_runtime_put(&framer->dev);
+ pm_runtime_put(&framer->dev);
}
EXPORT_SYMBOL_GPL(framer_pm_runtime_put);
diff --git a/include/linux/framer/framer.h b/include/linux/framer/framer.h
index 2b85fe9e7f9a..b1e575665fc5 100644
--- a/include/linux/framer/framer.h
+++ b/include/linux/framer/framer.h
@@ -96,7 +96,7 @@ struct framer {
#if IS_ENABLED(CONFIG_GENERIC_FRAMER)
int framer_pm_runtime_get(struct framer *framer);
int framer_pm_runtime_get_sync(struct framer *framer);
-int framer_pm_runtime_put(struct framer *framer);
+void framer_pm_runtime_put(struct framer *framer);
int framer_pm_runtime_put_sync(struct framer *framer);
int framer_init(struct framer *framer);
int framer_exit(struct framer *framer);
@@ -124,9 +124,8 @@ static inline int framer_pm_runtime_get_sync(struct framer *framer)
return -ENOSYS;
}
-static inline int framer_pm_runtime_put(struct framer *framer)
+static inline void framer_pm_runtime_put(struct framer *framer)
{
- return -ENOSYS;
}
static inline int framer_pm_runtime_put_sync(struct framer *framer)
--
2.51.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/3] net: Discard pm_runtime_put() return value
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
0 siblings, 0 replies; 16+ messages in thread
From: Rafael J. Wysocki @ 2026-01-07 12:41 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Rafael J. Wysocki, Linux PM, LKML, Ulf Hansson, Brian Norris,
Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni,
Siddharth Vadapalli, Roger Quadros, netdev, Nicolas Ferre,
Claudiu Beznea, Simon Horman
On Wed, Jan 7, 2026 at 1:29 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Sat, 03 Jan 2026 22:23:52 +0100 Rafael J. Wysocki wrote:
> > Subject: [PATCH v2 1/3] net: Discard pm_runtime_put() return value
>
> Sorry for noticing late -- looks like the subject prefix being 1/3
> instead of 0/3 is throwing patchwork off.
No worries.
> Patchwork seems to have
> mis-guessed that these are the first 3 patches of the missing ones
> in your full 23 patch series, instead of treating this as a fresh
> posting:
>
> https://patchwork.kernel.org/project/netdevbpf/list/?series=1035812&state=*
>
> Could you resend one more time with the cover letter subject corrected?
Done:
https://lore.kernel.org/linux-pm/2816529.mvXUDI8C0e@rafael.j.wysocki/
Interestingly enough, the kernel.org Patchwork seems to have got that right:
https://patchwork.kernel.org/project/linux-pm/list/?series=1038125
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2026-01-07 12:42 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` [RESEND][PATCH v2 1/3] net: ethernet: ti: am65-cpsw: " Rafael J. Wysocki
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
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).