* [PATCH] cpufreq: Print driver name if cpufreq_suspend() fails
@ 2019-08-21 23:16 Florian Fainelli
2019-08-22 2:42 ` Viresh Kumar
0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2019-08-21 23:16 UTC (permalink / raw)
To: linux-kernel
Cc: Florian Fainelli, Rafael J. Wysocki, Viresh Kumar,
open list:CPU FREQUENCY SCALING FRAMEWORK
Instead of printing the policy, which is incidentally a kernel pointer,
so with limited interest, print the cpufreq driver name that failed to
be suspend, which is more useful for debugging.
Fixes: 2f0aea936360 ("cpufreq: suspend governors on system suspend/hibernate")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/cpufreq/cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index c28ebf2810f1..330d789f81fc 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1807,8 +1807,8 @@ void cpufreq_suspend(void)
}
if (cpufreq_driver->suspend && cpufreq_driver->suspend(policy))
- pr_err("%s: Failed to suspend driver: %p\n", __func__,
- policy);
+ pr_err("%s: Failed to suspend driver: %s\n", __func__,
+ cpufreq_driver->name);
}
suspend:
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: Print driver name if cpufreq_suspend() fails
2019-08-21 23:16 [PATCH] cpufreq: Print driver name if cpufreq_suspend() fails Florian Fainelli
@ 2019-08-22 2:42 ` Viresh Kumar
2019-08-22 16:21 ` Florian Fainelli
0 siblings, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2019-08-22 2:42 UTC (permalink / raw)
To: Florian Fainelli
Cc: linux-kernel, Rafael J. Wysocki,
open list:CPU FREQUENCY SCALING FRAMEWORK
On 21-08-19, 16:16, Florian Fainelli wrote:
> Instead of printing the policy, which is incidentally a kernel pointer,
> so with limited interest, print the cpufreq driver name that failed to
> be suspend, which is more useful for debugging.
>
> Fixes: 2f0aea936360 ("cpufreq: suspend governors on system suspend/hibernate")
I will drop this tag as this isn't a bug really.
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/cpufreq/cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index c28ebf2810f1..330d789f81fc 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1807,8 +1807,8 @@ void cpufreq_suspend(void)
> }
>
> if (cpufreq_driver->suspend && cpufreq_driver->suspend(policy))
> - pr_err("%s: Failed to suspend driver: %p\n", __func__,
> - policy);
> + pr_err("%s: Failed to suspend driver: %s\n", __func__,
> + cpufreq_driver->name);
> }
>
> suspend:
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: Print driver name if cpufreq_suspend() fails
2019-08-22 2:42 ` Viresh Kumar
@ 2019-08-22 16:21 ` Florian Fainelli
2019-08-26 9:22 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2019-08-22 16:21 UTC (permalink / raw)
To: Viresh Kumar
Cc: linux-kernel, Rafael J. Wysocki,
open list:CPU FREQUENCY SCALING FRAMEWORK
On 8/21/19 7:42 PM, Viresh Kumar wrote:
> On 21-08-19, 16:16, Florian Fainelli wrote:
>> Instead of printing the policy, which is incidentally a kernel pointer,
>> so with limited interest, print the cpufreq driver name that failed to
>> be suspend, which is more useful for debugging.
>>
>> Fixes: 2f0aea936360 ("cpufreq: suspend governors on system suspend/hibernate")
>
> I will drop this tag as this isn't a bug really.
Indeed, that was a bit too trigger happy on my side. Thanks!
>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>> drivers/cpufreq/cpufreq.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>> index c28ebf2810f1..330d789f81fc 100644
>> --- a/drivers/cpufreq/cpufreq.c
>> +++ b/drivers/cpufreq/cpufreq.c
>> @@ -1807,8 +1807,8 @@ void cpufreq_suspend(void)
>> }
>>
>> if (cpufreq_driver->suspend && cpufreq_driver->suspend(policy))
>> - pr_err("%s: Failed to suspend driver: %p\n", __func__,
>> - policy);
>> + pr_err("%s: Failed to suspend driver: %s\n", __func__,
>> + cpufreq_driver->name);
>> }
>>
>> suspend:
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: Print driver name if cpufreq_suspend() fails
2019-08-22 16:21 ` Florian Fainelli
@ 2019-08-26 9:22 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2019-08-26 9:22 UTC (permalink / raw)
To: Florian Fainelli
Cc: Viresh Kumar, linux-kernel, open list:CPU FREQUENCY SCALING FRAMEWORK
On Thursday, August 22, 2019 6:21:20 PM CEST Florian Fainelli wrote:
> On 8/21/19 7:42 PM, Viresh Kumar wrote:
> > On 21-08-19, 16:16, Florian Fainelli wrote:
> >> Instead of printing the policy, which is incidentally a kernel pointer,
> >> so with limited interest, print the cpufreq driver name that failed to
> >> be suspend, which is more useful for debugging.
> >>
> >> Fixes: 2f0aea936360 ("cpufreq: suspend governors on system suspend/hibernate")
> >
> > I will drop this tag as this isn't a bug really.
>
> Indeed, that was a bit too trigger happy on my side. Thanks!
Applied without the Fixes tag, thanks!
> >
> >> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> >> ---
> >> drivers/cpufreq/cpufreq.c | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> >> index c28ebf2810f1..330d789f81fc 100644
> >> --- a/drivers/cpufreq/cpufreq.c
> >> +++ b/drivers/cpufreq/cpufreq.c
> >> @@ -1807,8 +1807,8 @@ void cpufreq_suspend(void)
> >> }
> >>
> >> if (cpufreq_driver->suspend && cpufreq_driver->suspend(policy))
> >> - pr_err("%s: Failed to suspend driver: %p\n", __func__,
> >> - policy);
> >> + pr_err("%s: Failed to suspend driver: %s\n", __func__,
> >> + cpufreq_driver->name);
> >> }
> >>
> >> suspend:
> >
> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> >
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-26 9:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21 23:16 [PATCH] cpufreq: Print driver name if cpufreq_suspend() fails Florian Fainelli
2019-08-22 2:42 ` Viresh Kumar
2019-08-22 16:21 ` Florian Fainelli
2019-08-26 9:22 ` 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.