All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM / runtime: Update links_count also if !CONFIG_SRCU
@ 2018-02-10 18:13 Lukas Wunner
  0 siblings, 0 replies; 3+ messages in thread
From: Lukas Wunner @ 2018-02-10 18:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki; +Cc: linux-kernel, linux-pm

Commit baa8809f6097 ("PM / runtime: Optimize the use of device links")
added an invocation of pm_runtime_drop_link() to __device_link_del().
However there are two variants of that function, one for CONFIG_SRCU and
another for !CONFIG_SRCU, and the commit only modified the former.

Fixes: baa8809f6097 ("PM / runtime: Optimize the use of device links")
Cc: stable@vger.kernel.org # v4.10+
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
---
 drivers/base/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index b2261f92f2f1..5847364f25d9 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -310,6 +310,9 @@ static void __device_link_del(struct device_link *link)
 	dev_info(link->consumer, "Dropping the link to %s\n",
 		 dev_name(link->supplier));
 
+	if (link->flags & DL_FLAG_PM_RUNTIME)
+		pm_runtime_drop_link(link->consumer);
+
 	list_del(&link->s_node);
 	list_del(&link->c_node);
 	device_link_free(link);
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] PM / runtime: Update links_count also if !CONFIG_SRCU
  2018-02-10 18:13 Lukas Wunner
@ 2018-02-14 10:53 ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2018-02-14 10:53 UTC (permalink / raw)
  To: Lukas Wunner
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, linux-kernel, linux-pm

On Saturday, February 10, 2018 7:13:58 PM CET Lukas Wunner wrote:
> Commit baa8809f6097 ("PM / runtime: Optimize the use of device links")
> added an invocation of pm_runtime_drop_link() to __device_link_del().
> However there are two variants of that function, one for CONFIG_SRCU and
> another for !CONFIG_SRCU, and the commit only modified the former.
> 
> Fixes: baa8809f6097 ("PM / runtime: Optimize the use of device links")
> Cc: stable@vger.kernel.org # v4.10+
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> ---
>  drivers/base/core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index b2261f92f2f1..5847364f25d9 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -310,6 +310,9 @@ static void __device_link_del(struct device_link *link)
>  	dev_info(link->consumer, "Dropping the link to %s\n",
>  		 dev_name(link->supplier));
>  
> +	if (link->flags & DL_FLAG_PM_RUNTIME)
> +		pm_runtime_drop_link(link->consumer);
> +
>  	list_del(&link->s_node);
>  	list_del(&link->c_node);
>  	device_link_free(link);
> 

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] PM / runtime: Update links_count also if !CONFIG_SRCU
@ 2018-02-10 18:13 Lukas Wunner
  2018-02-14 10:53 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Lukas Wunner @ 2018-02-10 18:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki; +Cc: linux-kernel

Commit baa8809f6097 ("PM / runtime: Optimize the use of device links")
added an invocation of pm_runtime_drop_link() to __device_link_del().
However there are two variants of that function, one for CONFIG_SRCU and
another for !CONFIG_SRCU, and the commit only modified the former.

Fixes: baa8809f6097 ("PM / runtime: Optimize the use of device links")
Cc: stable@vger.kernel.org # v4.10+
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
---
 drivers/base/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index b2261f92f2f1..5847364f25d9 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -310,6 +310,9 @@ static void __device_link_del(struct device_link *link)
 	dev_info(link->consumer, "Dropping the link to %s\n",
 		 dev_name(link->supplier));
 
+	if (link->flags & DL_FLAG_PM_RUNTIME)
+		pm_runtime_drop_link(link->consumer);
+
 	list_del(&link->s_node);
 	list_del(&link->c_node);
 	device_link_free(link);
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-14 10:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-10 18:13 [PATCH] PM / runtime: Update links_count also if !CONFIG_SRCU Lukas Wunner
2018-02-10 18:13 Lukas Wunner
2018-02-14 10:53 ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.