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 Lijun Ou (3): libhns: Package some lines for calculating qp buffer size libhns: Package for polling cqe function libhns: Bugfix for useing 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 | 108 ++++++++------ 4 files changed, 229 insertions(+), 183 deletions(-) -- 2.8.1