cpufreq: Print driver name if cpufreq_suspend() fails
PATCH 1/1 cpufreq: Print driver name if cpufreq_suspend() fails
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.
--- drivers/cpufreq/cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/cpufreq.c +2 -2
@@ -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:
Signature · 1 line
2.17.1
Quoted 5 lines · Florian Fainelli
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.
Quoted 10 lines
Signed-off-by Florian Fainelli <[email protected]>--- drivers/cpufreq/cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/cpufreq.c +0
-0
drivers/cpufreq/cpufreq.c void cpufreq_suspend(void) · line 1814
Quoted 10 lines
drivers/cpufreq/cpufreq.c +2
-2@@ -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:
Signature · 1 line
viresh
Quoted 8 lines · Viresh Kumar
Quoted 5 lines · Florian Fainelli
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!
Quoted 24 lines
Quoted 11 lines
Signed-off-by Florian Fainelli <[email protected]>--- drivers/cpufreq/cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/cpufreq.c +0
-0drivers/cpufreq/cpufreq.c void cpufreq_suspend(void) · line 1814
Quoted 10 lines
drivers/cpufreq/cpufreq.c +2
-2@@ -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 <[email protected]>
Signature · 1 line
Florian
Quoted 11 lines · CEST Florian Fainelli
Quoted 8 lines · Viresh Kumar
Quoted 5 lines · Florian Fainelli
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!
Quoted 27 lines
Quoted 24 lines
Quoted 11 lines
Signed-off-by Florian Fainelli <[email protected]>--- drivers/cpufreq/cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/cpufreq.c +0
-0drivers/cpufreq/cpufreq.c void cpufreq_suspend(void) · line 1814
Quoted 10 lines
drivers/cpufreq/cpufreq.c +2
-2@@ -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 <[email protected]>