This series optimizes some functions for reducing complexity as well as fix a bug. PR was sent: https://github.com/linux-rdma/rdma-core/pull/472 Change from V2: 1. Delete the casts on the output of malloc as well as calloc Change from V1: 1. Remove the warning by travisCI checking 2. Adjust the fixes style Lijun Ou (3): libhns: Package some lines for calculating qp buffer size libhns: Package for polling cqe function libhns: Bugfix for using buffer length chenglang (2): libhns: CQ depth does not support 0 libhns: Fix errors detected by Cppcheck tool providers/hns/hns_roce_u.c | 2 +- providers/hns/hns_roce_u_buf.c | 2 +- providers/hns/hns_roce_u_hw_v2.c | 300 +++++++++++++++++++++------------------ providers/hns/hns_roce_u_verbs.c | 105 ++++++++------ 4 files changed, 226 insertions(+), 183 deletions(-) -- 2.8.1