OSDN Git Service

RDMA/hns: Simplify the qp state convert code
authorLang Cheng <chenglang@huawei.com>
Wed, 15 Apr 2020 08:14:32 +0000 (16:14 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 24 Apr 2020 13:19:10 +0000 (10:19 -0300)
commita3de9e83810ced41ad7dece44c03f2338e44129d
tree9b4a3a719df4ca53763f254bdd60fc4e8e7414a2
parent375898e83d26d6da7414f129ed417ad7cef2728f
RDMA/hns: Simplify the qp state convert code

Use type map table to reduce the cyclomatic complexity.

Link: https://lore.kernel.org/r/1586938475-37049-4-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c