summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/llite/lloop.c
diff options
context:
space:
mode:
authorTina Ruchandani <ruchandani.tina@gmail.com>2014-10-22 11:29:26 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-23 11:09:12 +0800
commit0fa3b9d3542a76f192e4789352e5f8fafe8bc655 (patch)
tree148ca2c69525b2514fbcc159012d3c3867d962ce /drivers/staging/lustre/lustre/llite/lloop.c
parent57303e76c2251abf7d67f1afde30f861a93a49ff (diff)
staging: lustre: llite: Use kcalloc not kzalloc with mult
This patch fixes the following checkpatch.pl warnings: WARNING: Prefer kcalloc over kzalloc with multiply 166: FILE: drivers/staging/lustre/lustre/llite/dir.c:166: page_pool = kzalloc(sizeof(page) * max_pages, GFP_NOFS); 796: FILE: drivers/staging/lustre/lustre/llite/lloop.c:796: loop_dev = kzalloc(max_loop * sizeof(*loop_dev), GFP_KERNEL); 800: FILE: drivers/staging/lustre/lustre/llite/lloop.c:800: disks = kzalloc(max_loop * sizeof(*disks), GFP_KERNEL); Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/lloop.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/lloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index 264e5ec3fed6..e0f39fec2787 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -793,11 +793,11 @@ static int __init lloop_init(void)
if (ll_iocontrol_magic == NULL)
goto out_mem1;
- loop_dev = kzalloc(max_loop * sizeof(*loop_dev), GFP_KERNEL);
+ loop_dev = kcalloc(max_loop, sizeof(*loop_dev), GFP_KERNEL);
if (!loop_dev)
goto out_mem1;
- disks = kzalloc(max_loop * sizeof(*disks), GFP_KERNEL);
+ disks = kcalloc(max_loop, sizeof(*disks), GFP_KERNEL);
if (!disks)
goto out_mem2;