OSDN Git Service

RDMA/hns: optimize the duplicated code for qpc setting flow
authorXi Wang <wangxi11@huawei.com>
Mon, 8 Jul 2019 13:41:21 +0000 (21:41 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 25 Jul 2019 15:23:10 +0000 (12:23 -0300)
commit99441ab552f1e1713a562838215c080387a94267
tree4d3b7112a4e310826bbfada8f281c6d4bd19b3fa
parent947441eadb909b031fc0793d049e1af0d5855a21
RDMA/hns: optimize the duplicated code for qpc setting flow

Currently, more than 20 lines of duplicate code exist in function
'modify_qp_init_to_init' and function 'modify_qp_reset_to_init', which
affects the readability of the code. Consolidate them.

Link: https://lore.kernel.org/r/1562593285-8037-6-git-send-email-oulijun@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c