]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add hclge_cmd_check_retval() to parse comman's return value
authorWeihang Li <liweihang@hisilicon.com>
Sat, 2 Feb 2019 14:39:30 +0000 (22:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Feb 2019 16:24:08 +0000 (08:24 -0800)
commitbc359eb19c883d6eb1f16e7ee5bb42600a56dbdb
tree2e126f1cff25e2b444094c6c834f52e0d2a73103
parente63818925f7013683c49e174dd0287e550b12107
net: hns3: add hclge_cmd_check_retval() to parse comman's return value

For simplifying the code, this patch adds hclge_cmd_check_retval() to
check the return value of the command.

Also, according the IMP's description, when there are several descriptors
in a command, then the IMP will save the return value on the last
description, so hclge_cmd_check_retval() just check the last one for this
case.

Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c