RDMA: Use kzalloc for allocating only one thing
authorZheng Yongjun <zhengyongjun3@huawei.com>
Tue, 29 Dec 2020 13:52:23 +0000 (21:52 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 7 Jan 2021 20:47:53 +0000 (16:47 -0400)
commitaaf1226bd95b25b910617019a71d0de13f221c9d
tree1b56ef93af7f56426a4bebf05cbe7cbc087afbc8
parent0ccccb045c870a34730319cb1fb9cad8c8d53f2b
RDMA: Use kzalloc for allocating only one thing

Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

Link: https://lore.kernel.org/r/20201229135223.23815-1-zhengyongjun3@huawei.com
Link: https://lore.kernel.org/r/20201229135232.23869-1-zhengyongjun3@huawei.com
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/rw.c
drivers/infiniband/hw/cxgb4/restrack.c