]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: change the method of getting cmd index in debugfs
authorYufeng Mo <moyufeng@huawei.com>
Thu, 26 Aug 2021 11:21:59 +0000 (19:21 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 26 Aug 2021 14:24:17 +0000 (07:24 -0700)
commitc2b19c1f7d7dc446fddc5c3831da0c51c9cd8aac
treeb91faa2cba3de1ba88cf5a5bb620c43f945170b2
parentdaf23e0d0bda8747c6c6c065cacbb8daa3929778
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: 51b4d1974cac ("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>
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h