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.ku...@linaro.org> > > Tested-by: Lukasz Luba <lukasz.l...@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