net: hns3: refactor function hclgevf_parse_capability()
authorGuangbin Huang <huangguangbin2@huawei.com>
Sat, 28 Aug 2021 06:55:17 +0000 (14:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Aug 2021 10:20:05 +0000 (11:20 +0100)
commit81414ba71356b174d62370195a2bb99592e1b2a2
tree3bc75783b55a11045b3f431310b181715a9b6c0b
parente1d93bc6ef3bf497675f9ac2b35b79c48577b970
net: hns3: refactor function hclgevf_parse_capability()

The function hclgevf_parse_capability() will add more if statement in the
future, to improve code readability, maintainability and simplicity,
refactor this function by using a bit mapping array of IMP capabilities
and driver capabilities.

Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h