Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/bnxt_re: Replace kcalloc() with kzalloc_objs()

New code should use kzalloc_objs() instead of kcalloc(). Update the driver
accordingly.

Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

authored by

Leon Romanovsky and committed by
Leon Romanovsky
e69609c5 345f8427

+2 -3
+2 -3
drivers/infiniband/hw/bnxt_re/ib_verbs.c
··· 3486 3486 cq->qplib_cq.cq_handle = (u64)(unsigned long)(&cq->qplib_cq); 3487 3487 3488 3488 cq->max_cql = attr->cqe + 1; 3489 - cq->cql = kcalloc(cq->max_cql, sizeof(struct bnxt_qplib_cqe), 3490 - GFP_KERNEL); 3489 + cq->cql = kzalloc_objs(struct bnxt_qplib_cqe, cq->max_cql); 3491 3490 if (!cq->cql) 3492 3491 return -ENOMEM; 3493 3492 ··· 4411 4412 mr->ib_mr.lkey = mr->qplib_mr.lkey; 4412 4413 mr->ib_mr.rkey = mr->ib_mr.lkey; 4413 4414 4414 - mr->pages = kcalloc(max_num_sg, sizeof(u64), GFP_KERNEL); 4415 + mr->pages = kzalloc_objs(u64, max_num_sg); 4415 4416 if (!mr->pages) { 4416 4417 rc = -ENOMEM; 4417 4418 goto fail;