IB/mlx4: Convert kmalloc to kmalloc_array for checkpatch
authorLeon Romanovsky <leonro@mellanox.com>
Thu, 17 Dec 2015 07:31:53 +0000 (09:31 +0200)
committerDoug Ledford <dledford@redhat.com>
Thu, 24 Dec 2015 05:17:32 +0000 (00:17 -0500)
commitee37095044b85283c29cc4e7b254a7b30d411a9b
treeb19dc53c1ade6a604fca042f4b0e88e1fc4a7b1f
parent9afc60dcc406b96d22dfd7e5986d2a9ee44812f0
IB/mlx4: Convert kmalloc to kmalloc_array for checkpatch

Convert kmalloc to be kmalloc_array to fix warnings below:

WARNING: Prefer kmalloc_array over kmalloc with multiply
+               qp->sq.wrid = kmalloc(qp->sq.wqe_cnt * sizeof(u64),

WARNING: Prefer kmalloc_array over kmalloc with multiply
+               qp->rq.wrid = kmalloc(qp->rq.wqe_cnt * sizeof(u64),

WARNING: Prefer kmalloc_array over kmalloc with multiply
+               srq->wrid = kmalloc(srq->msrq.max * sizeof(u64),

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx4/qp.c
drivers/infiniband/hw/mlx4/srq.c