diff options
author | Yufeng Mo <moyufeng@huawei.com> | 2021-08-26 19:21:59 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-08-26 07:24:17 -0700 |
commit | 55649d56541bebecfd45ecd14f02944190538a66 (patch) | |
tree | b91faa2cba3de1ba88cf5a5bb620c43f945170b2 /drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h | |
parent | 94391fae82f71c98ecc7716a32611fcca73c74eb (diff) |
net: hns3: change the method of getting cmd index in debugfs
Currently, the cmd index is obtained in debugfs by comparing file names.
However, this method may cause errors when processing more complex file
names. So, change this method by saving cmd in private data and comparing
it when getting cmd index in debugfs for optimization.
Fixes: 5e69ea7ee2a6 ("net: hns3: refactor the debugfs process")
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h index f3766ff38bb7..bd8801065e02 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h @@ -22,6 +22,7 @@ struct hns3_dbg_item { struct hns3_dbg_data { struct hnae3_handle *handle; + enum hnae3_dbg_cmd cmd; u16 qid; }; |