cpufreq: s5pv210: remove unused call of pr_err()
Subsystems (2)
PATCH 1/1 cpufreq: s5pv210: remove unused call of pr_err()
A call of pr_err() was added in v3.1. It was guarded by a check for CONFIG_PM_VERBOSE. The Kconfig symbol PM_VERBOSE was removed in v3.0. So this call of pr_err() has never been used. Remove it.
---
Untested.
drivers/cpufreq/s5pv210-cpufreq.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/cpufreq/s5pv210-cpufreq.c +0 -4
@@ -175,10 +175,6 @@ static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index)mutex_lock (&set_freq_lock);if (no_cpufreq_access) { -#ifdef CONFIG_PM_VERBOSE -pr_err ("%s:%d denied access to %s as it is disabled" -"temporarily\n" , __FILE__, __LINE__, __func__); -#endif ret = -EINVAL ; goto exit; }
Signature · 1 line
1.9.0
Quoted 16 lines · Paul Bolle
A call of
pr_err()was added in v3.1. It was guarded by a check forCONFIG_PM_VERBOSE. TheKconfigsymbolPM_VERBOSEwas removed in v3.0. So this call ofpr_err()has never been used. Remove it.Signed-off-by Paul Bolle <[email protected]>---
Untested.drivers/cpufreq/s5pv210-cpufreq.c | 4 ---- 1 file changed, 4 deletions(-)drivers/cpufreq/s5pv210-cpufreq.c +0
-0
drivers/cpufreq/s5pv210-cpufreq.c static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index) · line 181
Quoted 7 lines
drivers/cpufreq/s5pv210-cpufreq.c +0
-4@@ -175,10 +175,6 @@ static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index)mutex_lock (&set_freq_lock);if (no_cpufreq_access) { -#ifdef CONFIG_PM_VERBOSE -pr_err ("%s:%d denied access to %s as it is disabled" -"temporarily\n" , __FILE__, __LINE__, __func__); -#endif
The config symbol itself is not defined and hence could be removed. However I feel, the
error message could be retained after trimming down the arguments a bit.
Signature · 2 lines
With warm regards, Sachin
Viresh Kumar
maintainerQuoted 19 lines · Sachin Kamat
Quoted 18 lines · Paul Bolle
A call of
pr_err()was added in v3.1. It was guarded by a check forCONFIG_PM_VERBOSE. TheKconfigsymbolPM_VERBOSEwas removed in v3.0. So this call ofpr_err()has never been used. Remove it.Signed-off-by Paul Bolle <[email protected]>---
Untested.drivers/cpufreq/s5pv210-cpufreq.c | 4 ---- 1 file changed, 4 deletions(-)drivers/cpufreq/s5pv210-cpufreq.c +0
-0@@ -175,10 +175,6 @@ static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index)mutex_lock (&set_freq_lock);
Quoted 7 lines
drivers/cpufreq/s5pv210-cpufreq.c static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index) · line 181
Quoted 5 lines
drivers/cpufreq/s5pv210-cpufreq.c +0
-4if (no_cpufreq_access) { -#ifdef CONFIG_PM_VERBOSE -pr_err ("%s:%d denied access to %s as it is disabled" -"temporarily\n" , __FILE__, __LINE__, __func__); -#endif The config symbol itself is not defined and hence could be removed.
What do you meant by this? He already got rid of CONFIG_PM_VERBOSE..
Quoted 2 lines
However I feel, the
error message could be retained after trimming down the arguments a bit.
I agree..
Quoted 28 lines · Viresh Kumar
Quoted 19 lines · Sachin Kamat
Quoted 18 lines · Paul Bolle
A call of
pr_err()was added in v3.1. It was guarded by a check forCONFIG_PM_VERBOSE. TheKconfigsymbolPM_VERBOSEwas removed in v3.0. So this call ofpr_err()has never been used. Remove it.Signed-off-by Paul Bolle <[email protected]>---
Untested.drivers/cpufreq/s5pv210-cpufreq.c | 4 ---- 1 file changed, 4 deletions(-)drivers/cpufreq/s5pv210-cpufreq.c +0
-0@@ -175,10 +175,6 @@ static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index)mutex_lock (&set_freq_lock);Quoted 7 lines
drivers/cpufreq/s5pv210-cpufreq.c static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index) · line 181
Quoted 5 lines
drivers/cpufreq/s5pv210-cpufreq.c +0
-4if (no_cpufreq_access) { -#ifdef CONFIG_PM_VERBOSE -pr_err ("%s:%d denied access to %s as it is disabled" -"temporarily\n" , __FILE__, __LINE__, __func__); -#endif The config symbol itself is not defined and hence could be removed.
Quoted 1 line
What do you meant by this? He already got rid of
CONFIG_PM_VERBOSE..
Yes, my ack for that change :)
Signature · 2 lines
With warm regards, Sachin
Sachin,
Quoted 3 lines · Sachin Kamat
The config symbol itself is not defined and hence could be removed. However I feel, the
error message could be retained after trimming down the arguments a bit.
My reasoning is, of course, that never used code can simply be dropped.
But you want to print an error here. That's fine with me. I prefer if you'd submit a patch that does that, as I have no idea whatsoever why an error is needed here nor what that error should say.
I do hope you don't mind me prodding you if that takes too long, and this pointless check of CONFIG_PM_VERBOSE is still here after, say, another development cycle.
Paul Bolle
Hi Paul,
Quoted 8 lines · Paul Bolle
Sachin,
Quoted 3 lines · Sachin Kamat
The config symbol itself is not defined and hence could be removed. However I feel, the
error message could be retained after trimming down the arguments a bit.My reasoning is, of course, that never used code can simply be dropped.
Yes, I agree. However the error message in this case should have been outside the ifdefs to begin with as it is not an extra information but an essential message
reporting error condition.
Quoted 4 lines
But you want to print an error here. That's fine with me. I prefer if you'd submit a patch that does that, as I have no idea whatsoever why an error is needed here nor what that error should say.
You may just remove the __FILE__ and __LINE__ thing and leave the message as is.
pr_err("Denied access to %s as it is disabled temporarily\n", __func__);
Signature · 2 lines
With warm regards, Sachin
PATCH v2 1/1 cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE
A pr_err() was added in v3.1. It was guarded by a check for CONFIG_PM_VERBOSE. The Kconfig symbol PM_VERBOSE was removed in v3.0. So this pr_err() has never been used. Drop that check and clean up the message a bit.
---
v1 was called "cpufreq: s5pv210: remove unused call of pr_err()". v2 keeps the pr_err() and trims down its arguments, as Sachin requested.
Still untested.
drivers/cpufreq/s5pv210-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/cpufreq/s5pv210-cpufreq.c +2 -4
@@ -175,10 +175,8 @@ static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index)mutex_lock (&set_freq_lock);if (no_cpufreq_access) { -#ifdef CONFIG_PM_VERBOSE -pr_err ("%s:%d denied access to %s as it is disabled" -"temporarily\n" , __FILE__, __LINE__, __func__); -#endif +pr_err ("Denied access to %s as it is disabled temporarily\n" , + __func__); ret = -EINVAL ; goto exit; }
Signature · 1 line
1.9.0
Re: [PATCH v2] cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE
Quoted 22 lines · Paul Bolle
A
pr_err()was added in v3.1. It was guarded by a check forCONFIG_PM_VERBOSE. TheKconfigsymbolPM_VERBOSEwas removed in v3.0. So thispr_err()has never been used. Drop that check and clean up the message a bit.Signed-off-by Paul Bolle <[email protected]>---
v1 was called "cpufreq: s5pv210: remove unused call ofpr_err()". v2 keeps thepr_err()and trims down its arguments, as Sachin requested.Still untested.
drivers/cpufreq/s5pv210-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/cpufreq/s5pv210-cpufreq.c +0
-0@@ -175,10 +175,8 @@ static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index)mutex_lock (&set_freq_lock);
drivers/cpufreq/s5pv210-cpufreq.c static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index) · line 182
Quoted 10 lines
drivers/cpufreq/s5pv210-cpufreq.c +2
-4if (no_cpufreq_access) { -#ifdef CONFIG_PM_VERBOSE -pr_err ("%s:%d denied access to %s as it is disabled" -"temporarily\n" , __FILE__, __LINE__, __func__); -#endif +pr_err ("Denied access to %s as it is disabled temporarily\n" , + __func__); ret = -EINVAL ; goto exit; }
Re: [PATCH v2] cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE
In reply to Paul BolleHi Paul,
Quoted 6 lines · Paul Bolle
A
pr_err()was added in v3.1. It was guarded by a check forCONFIG_PM_VERBOSE. TheKconfigsymbolPM_VERBOSEwas removed in v3.0. So thispr_err()has never been used. Drop that check and clean up the message a bit.Signed-off-by Paul Bolle <[email protected]>