This patch fixes the following checkpatch.pl warning:
WARNING: Prefer kmalloc_array over kmalloc with multiply
Signed-off-by: Denis Petrovic <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
memset(cfs_trace_data, 0, sizeof(cfs_trace_data));
for (i = 0; i < CFS_TCD_TYPE_MAX; i++) {
cfs_trace_data[i] =
- kmalloc(sizeof(union cfs_trace_data_union) *
- num_possible_cpus(), GFP_KERNEL);
+ kmalloc_array(num_possible_cpus(),
+ sizeof(union cfs_trace_data_union),
+ GFP_KERNEL);
if (!cfs_trace_data[i])
goto out;
}