Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1647702

Re: [PATCH V4 03/17] thermal: cpu_cooling: Name cpufreq cooling devices as cpufreq_cdev

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH V4 03/17] thermal: cpu_cooling: Name cpufreq cooling devices as cpufreq_cdev
Date 2017-05-23 09:10 +0200
Message-ID <tKc79-8iP-27@gated-at.bofh.it> (permalink)
References <tA5Tk-3rD-7@gated-at.bofh.it> <tA630-3ve-21@gated-at.bofh.it> <tKbE5-7Qs-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 23-05-17, 14:37, Zhang Rui wrote:
> On Tue, 2017-04-25 at 15:57 +0530, Viresh Kumar wrote:
> > Objects of "struct cpufreq_cooling_device" are named a bit
> > inconsistently. Lets use cpufreq_cdev everywhere. Also note that the
> > lists containing such devices is renamed similarly too.
> > 
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > Tested-by: Lukasz Luba <lukasz.luba@arm.com>
> > ---
> >  drivers/thermal/cpu_cooling.c | 248 +++++++++++++++++++++-----------
> > ----------
> >  1 file changed, 124 insertions(+), 124 deletions(-)
> > 
> > 
> 
> >  
> >  	num_cpus = cpumask_weight(clip_cpus);
> > -	cpufreq_dev->time_in_idle = kcalloc(num_cpus,
> > -					    sizeof(*cpufreq_dev-
> > >time_in_idle),
> > +	cpufreq_cdev->time_in_idle = kcalloc(num_cpus,
> > +					    sizeof(*cpufreq_cdev-
> > >time_in_idle),
> >  					    GFP_KERNEL);
> 
> checkpatch complains about this line

Not about this line, but the one present below it.

> WARNING: Prefer kmalloc_array over kmalloc with multiply
> #544: FILE: drivers/thermal/cpu_cooling.c:827:
> +	cpufreq_cdev->freq_table = kmalloc(sizeof(*cpufreq_cdev-
> >freq_table) *
> +					  cpufreq_cdev->max_level,
> GFP_KERNEL);
> 
> total: 0 errors, 1 warnings, 614 lines checked
> 
> NOTE: For some of the reported defects, checkpatch may be able to
>       mechanically convert to the typical style using --fix or --fix-
> inplace.
> 
> and also patch 8/17.
> 
> It's better to get this fixed.

Sure. As this was existing code and nothing new that I added, I have
sent a separate patch in reply to your email to get that fixed. You
can apply this series followed by that patch now.

-- 
viresh

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH V4 03/17] thermal: cpu_cooling: Name cpufreq cooling  devices as cpufreq_cdev Zhang Rui <rui.zhang@intel.com> - 2017-05-23 08:40 +0200
  [PATCH] thermal: cpu_cooling: Replace kmalloc with kmalloc_array Viresh Kumar <viresh.kumar@linaro.org> - 2017-05-23 09:10 +0200
    Re: [PATCH] thermal: cpu_cooling: Replace kmalloc with kmalloc_array Eduardo Valentin <edubezval@gmail.com> - 2017-05-24 04:30 +0200
      Re: [PATCH] thermal: cpu_cooling: Replace kmalloc with kmalloc_array Viresh Kumar <viresh.kumar@linaro.org> - 2017-05-24 06:00 +0200
  Re: [PATCH V4 03/17] thermal: cpu_cooling: Name cpufreq cooling  devices as cpufreq_cdev Viresh Kumar <viresh.kumar@linaro.org> - 2017-05-23 09:10 +0200

csiph-web