]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Simplify the cqe code of poll cq
authorLang Cheng <chenglang@huawei.com>
Wed, 15 Apr 2020 08:14:33 +0000 (16:14 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 24 Apr 2020 13:19:10 +0000 (10:19 -0300)
commit91fb6cbfde549dbe7436df624fcfc37fafb0fa38
treec6990568b2352b6bd48559b25bd43e605bf05030
parentf26c074a53dd1af076a99fda976c256f40a8590c
RDMA/hns: Simplify the cqe code of poll cq

Encapsulate codes to get status of cqe into a function and use map table
instead of switch-case to reduce cyclomatic complexity of
hns_roce_v2_poll_one().

Link: https://lore.kernel.org/r/1586938475-37049-5-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