diff options
author | Denis Petrovic <denis.petrovic@edu.ece.fr> | 2017-06-25 14:52:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-29 16:38:53 +0200 |
commit | 9b326dfce12afb429915c63f5a3df4afa4bea957 (patch) | |
tree | b10b8834f09b51b359a006f6356e0bfacd522a49 | |
parent | 878c33a78811f90795f17333bc3a7c819a1589a7 (diff) |
staging: lustre: replace kmalloc with kmalloc_array
This patch fixes the following checkpatch.pl warning:
WARNING: Prefer kmalloc_array over kmalloc with multiply
Signed-off-by: Denis Petrovic <denis.petrovic@edu.ece.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c index 75eb84e7f0f8..a5a94788f11f 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c @@ -57,8 +57,9 @@ int cfs_tracefile_init_arch(void) 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; } |