Skip to contentSkip to conversation

cpufreq: s5pv210: remove unused call of pr_err()

PATCH In review Paul Bolle 3 participants 9 messages May 21, 2014 – May 23, 2014

Subsystems (2)
lore
Share & tools
lore

Paul Bolle

author
#0 lore raw

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
index ab2c1a40d437..0873729135df 100644
@@ -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
#1 lore raw
Quoted 16 lines · Paul Bolle

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 -0
index ab2c1a40d437..0873729135df 100644

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
maintainer
#2 lore raw
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 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 -0
index ab2c1a40d437..0873729135df 100644
@@ -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 -4
        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.

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..

#3 lore raw
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 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 -0
index ab2c1a40d437..0873729135df 100644
@@ -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 -4
        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.

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
author
#4 lore raw
In reply to Sachin Kamat

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

#5 lore raw

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
author
#6 lore raw

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
index ab2c1a40d437..19a10b89fef7 100644
@@ -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
maintainer Acked-by on v2 1/1
#7 lore raw

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 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 +0 -0
index ab2c1a40d437..19a10b89fef7 100644
@@ -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 -4
        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;
        }