]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hns: Optimize the logic of allocating memory using APIs
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Wed, 23 Nov 2016 19:41:01 +0000 (19:41 +0000)
committerDoug Ledford <dledford@redhat.com>
Sat, 3 Dec 2016 19:20:42 +0000 (14:20 -0500)
commit919c133fea652822addcf0d63a7ae39a0dc0681d
tree1088df417ae9ef7283f51ba849ae7f60b7675ff8
parent4a054b96e6a87b1c33c97ff452edfe0ecb61d9f3
IB/hns: Optimize the logic of allocating memory using APIs

This patch modified the logic of allocating memory using APIs in
hns RoCE driver. We used kcalloc instead of kmalloc_array and
bitmap_zero. And When kcalloc failed, call vzalloc to alloc
memory.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Ping Zhang <zhangping5@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_mr.c