]> git.karo-electronics.de Git - linux-beck.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)
commit8d497eb0f325e98fa87b59ac86069deea64e8d5d
tree1088df417ae9ef7283f51ba849ae7f60b7675ff8
parent8f3e9f3ea0871a988ec9540a4cde48a20c1cb98b
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