linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / OPP: Move error message to debug level
@ 2017-09-29 17:39 Fabio Estevam
  2017-10-04  6:49 ` Viresh Kumar
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2017-09-29 17:39 UTC (permalink / raw)
  To: vireshk
  Cc: nm, sboyd, rjw, linux-pm, festevam, shawnguo, anson.huang,
	Fabio Estevam

On some i.MX6 platforms which do not have speed grading
check, opp table will not be created in platform code,
so cpufreq driver prints the following error message:

cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)

However, this is not really an error in this case because the
imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count()
and if it fails, it means that platform code does not provide
OPP and then dev_pm_opp_of_add_table() will be called.

In order to avoid such confusing error message, move it to
debug level.

It is up to the caller of dev_pm_opp_get_opp_count() to check its
return value and decide if it will print an error or not.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Previous discussion on this topic:
https://patchwork.kernel.org/patch/9295059/

 drivers/base/power/opp/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index a6de325..0459b12 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -296,7 +296,7 @@ int dev_pm_opp_get_opp_count(struct device *dev)
 	opp_table = _find_opp_table(dev);
 	if (IS_ERR(opp_table)) {
 		count = PTR_ERR(opp_table);
-		dev_err(dev, "%s: OPP table not found (%d)\n",
+		dev_dbg(dev, "%s: OPP table not found (%d)\n",
 			__func__, count);
 		return count;
 	}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM / OPP: Move error message to debug level
  2017-09-29 17:39 [PATCH] PM / OPP: Move error message to debug level Fabio Estevam
@ 2017-10-04  6:49 ` Viresh Kumar
  2017-10-18 12:01   ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2017-10-04  6:49 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: vireshk, nm, sboyd, rjw, linux-pm, festevam, shawnguo,
	anson.huang

On 29-09-17, 14:39, Fabio Estevam wrote:
> On some i.MX6 platforms which do not have speed grading
> check, opp table will not be created in platform code,
> so cpufreq driver prints the following error message:
> 
> cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)
> 
> However, this is not really an error in this case because the
> imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count()
> and if it fails, it means that platform code does not provide
> OPP and then dev_pm_opp_of_add_table() will be called.
> 
> In order to avoid such confusing error message, move it to
> debug level.
> 
> It is up to the caller of dev_pm_opp_get_opp_count() to check its
> return value and decide if it will print an error or not.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
> Previous discussion on this topic:
> https://patchwork.kernel.org/patch/9295059/
> 
>  drivers/base/power/opp/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
> index a6de325..0459b12 100644
> --- a/drivers/base/power/opp/core.c
> +++ b/drivers/base/power/opp/core.c
> @@ -296,7 +296,7 @@ int dev_pm_opp_get_opp_count(struct device *dev)
>  	opp_table = _find_opp_table(dev);
>  	if (IS_ERR(opp_table)) {
>  		count = PTR_ERR(opp_table);
> -		dev_err(dev, "%s: OPP table not found (%d)\n",
> +		dev_dbg(dev, "%s: OPP table not found (%d)\n",
>  			__func__, count);
>  		return count;
>  	}

Applied. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM / OPP: Move error message to debug level
  2017-10-04  6:49 ` Viresh Kumar
@ 2017-10-18 12:01   ` Fabio Estevam
  2017-10-18 13:07     ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2017-10-18 12:01 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Fabio Estevam, vireshk, Nishanth Menon, Stephen Boyd,
	rjw@rjwysocki.net, linux-pm@vger.kernel.org, Shawn Guo,
	Yongcai Huang

Hi Viresh,

On Wed, Oct 4, 2017 at 3:49 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 29-09-17, 14:39, Fabio Estevam wrote:
>> On some i.MX6 platforms which do not have speed grading
>> check, opp table will not be created in platform code,
>> so cpufreq driver prints the following error message:
>>
>> cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)
>>
>> However, this is not really an error in this case because the
>> imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count()
>> and if it fails, it means that platform code does not provide
>> OPP and then dev_pm_opp_of_add_table() will be called.
>>
>> In order to avoid such confusing error message, move it to
>> debug level.
>>
>> It is up to the caller of dev_pm_opp_get_opp_count() to check its
>> return value and decide if it will print an error or not.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>> ---
>> Previous discussion on this topic:
>> https://patchwork.kernel.org/patch/9295059/
>>
>>  drivers/base/power/opp/core.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
>> index a6de325..0459b12 100644
>> --- a/drivers/base/power/opp/core.c
>> +++ b/drivers/base/power/opp/core.c
>> @@ -296,7 +296,7 @@ int dev_pm_opp_get_opp_count(struct device *dev)
>>       opp_table = _find_opp_table(dev);
>>       if (IS_ERR(opp_table)) {
>>               count = PTR_ERR(opp_table);
>> -             dev_err(dev, "%s: OPP table not found (%d)\n",
>> +             dev_dbg(dev, "%s: OPP table not found (%d)\n",
>>                       __func__, count);
>>               return count;
>>       }
>
> Applied. Thanks.

I do not see this patch in your tree nor in linux-next.

In linux-next I noticed that this file has been renamed as drivers/opp/core.c.

Would you like me to submit a new patch with this new file path?

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM / OPP: Move error message to debug level
  2017-10-18 12:01   ` Fabio Estevam
@ 2017-10-18 13:07     ` Rafael J. Wysocki
  2017-10-18 14:49       ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2017-10-18 13:07 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Viresh Kumar, Fabio Estevam, vireshk, Nishanth Menon,
	Stephen Boyd, linux-pm@vger.kernel.org, Shawn Guo, Yongcai Huang

On Wednesday, October 18, 2017 2:01:44 PM CEST Fabio Estevam wrote:
> Hi Viresh,
> 
> On Wed, Oct 4, 2017 at 3:49 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > On 29-09-17, 14:39, Fabio Estevam wrote:
> >> On some i.MX6 platforms which do not have speed grading
> >> check, opp table will not be created in platform code,
> >> so cpufreq driver prints the following error message:
> >>
> >> cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)
> >>
> >> However, this is not really an error in this case because the
> >> imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count()
> >> and if it fails, it means that platform code does not provide
> >> OPP and then dev_pm_opp_of_add_table() will be called.
> >>
> >> In order to avoid such confusing error message, move it to
> >> debug level.
> >>
> >> It is up to the caller of dev_pm_opp_get_opp_count() to check its
> >> return value and decide if it will print an error or not.
> >>
> >> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> >> ---
> >> Previous discussion on this topic:
> >> https://patchwork.kernel.org/patch/9295059/
> >>
> >>  drivers/base/power/opp/core.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
> >> index a6de325..0459b12 100644
> >> --- a/drivers/base/power/opp/core.c
> >> +++ b/drivers/base/power/opp/core.c
> >> @@ -296,7 +296,7 @@ int dev_pm_opp_get_opp_count(struct device *dev)
> >>       opp_table = _find_opp_table(dev);
> >>       if (IS_ERR(opp_table)) {
> >>               count = PTR_ERR(opp_table);
> >> -             dev_err(dev, "%s: OPP table not found (%d)\n",
> >> +             dev_dbg(dev, "%s: OPP table not found (%d)\n",
> >>                       __func__, count);
> >>               return count;
> >>       }
> >
> > Applied. Thanks.
> 
> I do not see this patch in your tree nor in linux-next.

What about commit 035ed07208dc (PM / OPP: Move error message to debug level)?

Isn't that this one?

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM / OPP: Move error message to debug level
  2017-10-18 13:07     ` Rafael J. Wysocki
@ 2017-10-18 14:49       ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2017-10-18 14:49 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Viresh Kumar, Fabio Estevam, vireshk, Nishanth Menon,
	Stephen Boyd, linux-pm@vger.kernel.org, Shawn Guo, Yongcai Huang

Hi Rafael,

On Wed, Oct 18, 2017 at 11:07 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:

> What about commit 035ed07208dc (PM / OPP: Move error message to debug level)?
>
> Isn't that this one?

Yes, I can see it now on today's linux-next. Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-18 14:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-29 17:39 [PATCH] PM / OPP: Move error message to debug level Fabio Estevam
2017-10-04  6:49 ` Viresh Kumar
2017-10-18 12:01   ` Fabio Estevam
2017-10-18 13:07     ` Rafael J. Wysocki
2017-10-18 14:49       ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).