Re: [PATCH v2 9/9] thermal: cpu_cooling: Clarify error message

2019-01-21 Thread Amit Kucheria
On Thu, Jan 17, 2019 at 4:04 PM Rafael J. Wysocki  wrote:
>
> On Thu, Jan 17, 2019 at 6:57 AM Viresh Kumar  wrote:
> >
> > On 14-01-19, 15:51, Amit Kucheria wrote:
> > > Make it clear that it is a failure if the cpufreq driver was unable to
> > > register as a cooling device. Makes it easier to find in logs and
> > > grepping for words like fail, err, warn.
> > >
> > > Signed-off-by: Amit Kucheria 
> > > ---
> > >  drivers/thermal/cpu_cooling.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> > > index dfd23245f778..6fff16113628 100644
> > > --- a/drivers/thermal/cpu_cooling.c
> > > +++ b/drivers/thermal/cpu_cooling.c
> > > @@ -774,7 +774,7 @@ of_cpufreq_cooling_register(struct cpufreq_policy 
> > > *policy)
> > >
> > >   cdev = __cpufreq_cooling_register(np, policy, capacitance);
> > >   if (IS_ERR(cdev)) {
> > > - pr_err("cpu_cooling: cpu%d is not running as 
> > > cooling device: %ld\n",
> > > + pr_err("cpu_cooling: cpu%d failed to register as 
> > > cooling device: %ld\n",
> > >  policy->cpu, PTR_ERR(cdev));
> > >   cdev = NULL;
> > >   }
> >
> > Always keep such cleanup patches at the top, so the maintainers can
> > pick them up easily even if the entire series doesn't get in.
>
> Actually, if nothing in the series depends on this change and this
> change doesn't depend on anything in the series, why is it part of the
> series at all?

Indeed, I should've separated this from the series. Done now.


Re: [PATCH v2 9/9] thermal: cpu_cooling: Clarify error message

2019-01-17 Thread Rafael J. Wysocki
On Thu, Jan 17, 2019 at 6:57 AM Viresh Kumar  wrote:
>
> On 14-01-19, 15:51, Amit Kucheria wrote:
> > Make it clear that it is a failure if the cpufreq driver was unable to
> > register as a cooling device. Makes it easier to find in logs and
> > grepping for words like fail, err, warn.
> >
> > Signed-off-by: Amit Kucheria 
> > ---
> >  drivers/thermal/cpu_cooling.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> > index dfd23245f778..6fff16113628 100644
> > --- a/drivers/thermal/cpu_cooling.c
> > +++ b/drivers/thermal/cpu_cooling.c
> > @@ -774,7 +774,7 @@ of_cpufreq_cooling_register(struct cpufreq_policy 
> > *policy)
> >
> >   cdev = __cpufreq_cooling_register(np, policy, capacitance);
> >   if (IS_ERR(cdev)) {
> > - pr_err("cpu_cooling: cpu%d is not running as cooling 
> > device: %ld\n",
> > + pr_err("cpu_cooling: cpu%d failed to register as 
> > cooling device: %ld\n",
> >  policy->cpu, PTR_ERR(cdev));
> >   cdev = NULL;
> >   }
>
> Always keep such cleanup patches at the top, so the maintainers can
> pick them up easily even if the entire series doesn't get in.

Actually, if nothing in the series depends on this change and this
change doesn't depend on anything in the series, why is it part of the
series at all?


Re: [PATCH v2 9/9] thermal: cpu_cooling: Clarify error message

2019-01-16 Thread Viresh Kumar
On 14-01-19, 15:51, Amit Kucheria wrote:
> Make it clear that it is a failure if the cpufreq driver was unable to
> register as a cooling device. Makes it easier to find in logs and
> grepping for words like fail, err, warn.
> 
> Signed-off-by: Amit Kucheria 
> ---
>  drivers/thermal/cpu_cooling.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> index dfd23245f778..6fff16113628 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -774,7 +774,7 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy)
>  
>   cdev = __cpufreq_cooling_register(np, policy, capacitance);
>   if (IS_ERR(cdev)) {
> - pr_err("cpu_cooling: cpu%d is not running as cooling 
> device: %ld\n",
> + pr_err("cpu_cooling: cpu%d failed to register as 
> cooling device: %ld\n",
>  policy->cpu, PTR_ERR(cdev));
>   cdev = NULL;
>   }

Always keep such cleanup patches at the top, so the maintainers can
pick them up easily even if the entire series doesn't get in.

Acked-by: Viresh Kumar 

-- 
viresh


[PATCH v2 9/9] thermal: cpu_cooling: Clarify error message

2019-01-14 Thread Amit Kucheria
Make it clear that it is a failure if the cpufreq driver was unable to
register as a cooling device. Makes it easier to find in logs and
grepping for words like fail, err, warn.

Signed-off-by: Amit Kucheria 
---
 drivers/thermal/cpu_cooling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index dfd23245f778..6fff16113628 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -774,7 +774,7 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy)
 
cdev = __cpufreq_cooling_register(np, policy, capacitance);
if (IS_ERR(cdev)) {
-   pr_err("cpu_cooling: cpu%d is not running as cooling 
device: %ld\n",
+   pr_err("cpu_cooling: cpu%d failed to register as 
cooling device: %ld\n",
   policy->cpu, PTR_ERR(cdev));
cdev = NULL;
}
-- 
2.17.1