Re: [PATCH] thermal: cpu_cooling: Replace kmalloc with kmalloc_array

2017-05-23 Thread Viresh Kumar
On 23-05-17, 19:27, Eduardo Valentin wrote: > Hello, > > On Tue, May 23, 2017 at 12:33:06PM +0530, Viresh Kumar wrote: > > Checkpatch reports following: > > > > WARNING: Prefer kmalloc_array over kmalloc with multiply > > + cpufreq_cdev->freq_table = kmalloc(sizeof(*cpufreq_cdev->freq_table) *

Re: [PATCH] thermal: cpu_cooling: Replace kmalloc with kmalloc_array

2017-05-23 Thread Eduardo Valentin
Hello, On Tue, May 23, 2017 at 12:33:06PM +0530, Viresh Kumar wrote: > Checkpatch reports following: > > WARNING: Prefer kmalloc_array over kmalloc with multiply > + cpufreq_cdev->freq_table = kmalloc(sizeof(*cpufreq_cdev->freq_table) * > i, > > Fix that. That is how the patch would apply.