* [PATCH] cpufreq: s5pv210: remove unused call of pr_err()
@ 2014-05-21 19:53 Paul Bolle
2014-05-22 3:22 ` Sachin Kamat
0 siblings, 1 reply; 9+ messages in thread
From: Paul Bolle @ 2014-05-21 19:53 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar; +Cc: cpufreq, linux-pm, linux-kernel
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.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Untested.
drivers/cpufreq/s5pv210-cpufreq.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
index ab2c1a40d437..0873729135df 100644
--- a/drivers/cpufreq/s5pv210-cpufreq.c
+++ b/drivers/cpufreq/s5pv210-cpufreq.c
@@ -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;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] cpufreq: s5pv210: remove unused call of pr_err()
2014-05-21 19:53 [PATCH] cpufreq: s5pv210: remove unused call of pr_err() Paul Bolle
@ 2014-05-22 3:22 ` Sachin Kamat
2014-05-22 4:14 ` Viresh Kumar
2014-05-22 6:41 ` Paul Bolle
0 siblings, 2 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-05-22 3:22 UTC (permalink / raw)
To: Paul Bolle
Cc: Rafael J. Wysocki, Viresh Kumar, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org, LKML
On 22 May 2014 01:23, Paul Bolle <pebolle@tiscali.nl> wrote:
> 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.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> Untested.
>
> drivers/cpufreq/s5pv210-cpufreq.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
> index ab2c1a40d437..0873729135df 100644
> --- a/drivers/cpufreq/s5pv210-cpufreq.c
> +++ b/drivers/cpufreq/s5pv210-cpufreq.c
> @@ -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.
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] cpufreq: s5pv210: remove unused call of pr_err()
2014-05-22 3:22 ` Sachin Kamat
@ 2014-05-22 4:14 ` Viresh Kumar
2014-05-22 4:19 ` Sachin Kamat
2014-05-22 6:41 ` Paul Bolle
1 sibling, 1 reply; 9+ messages in thread
From: Viresh Kumar @ 2014-05-22 4:14 UTC (permalink / raw)
To: Sachin Kamat
Cc: Paul Bolle, Rafael J. Wysocki, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org, LKML
On 22 May 2014 08:52, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> On 22 May 2014 01:23, Paul Bolle <pebolle@tiscali.nl> wrote:
>> 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.
>>
>> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
>> ---
>> Untested.
>>
>> drivers/cpufreq/s5pv210-cpufreq.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
>> index ab2c1a40d437..0873729135df 100644
>> --- a/drivers/cpufreq/s5pv210-cpufreq.c
>> +++ b/drivers/cpufreq/s5pv210-cpufreq.c
>> @@ -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.
What do you meant by this? He already got rid of CONFIG_PM_VERBOSE..
> However I feel, the
> error message could be retained after trimming down the arguments a bit.
I agree..
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] cpufreq: s5pv210: remove unused call of pr_err()
2014-05-22 4:14 ` Viresh Kumar
@ 2014-05-22 4:19 ` Sachin Kamat
0 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-05-22 4:19 UTC (permalink / raw)
To: Viresh Kumar
Cc: Paul Bolle, Rafael J. Wysocki, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org, LKML
On 22 May 2014 09:44, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 22 May 2014 08:52, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> On 22 May 2014 01:23, Paul Bolle <pebolle@tiscali.nl> wrote:
>>> 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.
>>>
>>> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
>>> ---
>>> Untested.
>>>
>>> drivers/cpufreq/s5pv210-cpufreq.c | 4 ----
>>> 1 file changed, 4 deletions(-)
>>>
>>> diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
>>> index ab2c1a40d437..0873729135df 100644
>>> --- a/drivers/cpufreq/s5pv210-cpufreq.c
>>> +++ b/drivers/cpufreq/s5pv210-cpufreq.c
>>> @@ -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.
>
> What do you meant by this? He already got rid of CONFIG_PM_VERBOSE..
Yes, my ack for that change :)
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] cpufreq: s5pv210: remove unused call of pr_err()
2014-05-22 3:22 ` Sachin Kamat
2014-05-22 4:14 ` Viresh Kumar
@ 2014-05-22 6:41 ` Paul Bolle
2014-05-22 8:23 ` Sachin Kamat
1 sibling, 1 reply; 9+ messages in thread
From: Paul Bolle @ 2014-05-22 6:41 UTC (permalink / raw)
To: Sachin Kamat
Cc: Rafael J. Wysocki, Viresh Kumar, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org, LKML
Sachin,
On Thu, 2014-05-22 at 08:52 +0530, Sachin Kamat wrote:
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] cpufreq: s5pv210: remove unused call of pr_err()
2014-05-22 6:41 ` Paul Bolle
@ 2014-05-22 8:23 ` Sachin Kamat
2014-05-23 15:05 ` [PATCH v2] cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE Paul Bolle
0 siblings, 1 reply; 9+ messages in thread
From: Sachin Kamat @ 2014-05-22 8:23 UTC (permalink / raw)
To: Paul Bolle
Cc: Rafael J. Wysocki, Viresh Kumar, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org, LKML
Hi Paul,
On 22 May 2014 12:11, Paul Bolle <pebolle@tiscali.nl> wrote:
> Sachin,
>
> On Thu, 2014-05-22 at 08:52 +0530, Sachin Kamat wrote:
>> 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.
>
> 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__);
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE
2014-05-22 8:23 ` Sachin Kamat
@ 2014-05-23 15:05 ` Paul Bolle
2014-05-23 15:10 ` Viresh Kumar
2014-05-23 15:14 ` Sachin Kamat
0 siblings, 2 replies; 9+ messages in thread
From: Paul Bolle @ 2014-05-23 15:05 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar
Cc: Sachin Kamat, cpufreq, linux-pm, linux-kernel
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.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
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(-)
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
index ab2c1a40d437..19a10b89fef7 100644
--- a/drivers/cpufreq/s5pv210-cpufreq.c
+++ b/drivers/cpufreq/s5pv210-cpufreq.c
@@ -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;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2] cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE
2014-05-23 15:05 ` [PATCH v2] cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE Paul Bolle
@ 2014-05-23 15:10 ` Viresh Kumar
2014-05-23 15:14 ` Sachin Kamat
1 sibling, 0 replies; 9+ messages in thread
From: Viresh Kumar @ 2014-05-23 15:10 UTC (permalink / raw)
To: Paul Bolle
Cc: Rafael J. Wysocki, Sachin Kamat, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org, Linux Kernel Mailing List
On 23 May 2014 20:35, Paul Bolle <pebolle@tiscali.nl> wrote:
> 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.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> 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(-)
>
> diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
> index ab2c1a40d437..19a10b89fef7 100644
> --- a/drivers/cpufreq/s5pv210-cpufreq.c
> +++ b/drivers/cpufreq/s5pv210-cpufreq.c
> @@ -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;
> }
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE
2014-05-23 15:05 ` [PATCH v2] cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE Paul Bolle
2014-05-23 15:10 ` Viresh Kumar
@ 2014-05-23 15:14 ` Sachin Kamat
1 sibling, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-05-23 15:14 UTC (permalink / raw)
To: Paul Bolle
Cc: Rafael J. Wysocki, Viresh Kumar, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org, LKML
Hi Paul,
On 23 May 2014 20:35, Paul Bolle <pebolle@tiscali.nl> wrote:
> 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.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-05-23 15:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21 19:53 [PATCH] cpufreq: s5pv210: remove unused call of pr_err() Paul Bolle
2014-05-22 3:22 ` Sachin Kamat
2014-05-22 4:14 ` Viresh Kumar
2014-05-22 4:19 ` Sachin Kamat
2014-05-22 6:41 ` Paul Bolle
2014-05-22 8:23 ` Sachin Kamat
2014-05-23 15:05 ` [PATCH v2] cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE Paul Bolle
2014-05-23 15:10 ` Viresh Kumar
2014-05-23 15:14 ` Sachin Kamat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox