]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/hns: Modify debugfs name
authorYuyu Li <liyuyu6@huawei.com>
Thu, 24 Oct 2024 12:39:58 +0000 (20:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:53:35 +0000 (13:53 +0100)
[ Upstream commit 370a9351bf84afc5a56a3f02ba3805bbfcb53c32 ]

The sub-directory of hns_roce debugfs is named after the device's
kernel name currently, but it will be inconvenient to use when
the device is renamed.

Modify the name to pci name as users can always easily find the
correspondence between an RDMA device and its pci name.

Fixes: eb7854d63db5 ("RDMA/hns: Support SW stats with debugfs")
Signed-off-by: Yuyu Li <liyuyu6@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20241024124000.2931869-4-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_debugfs.c

index e8febb40f6450c9e696fa867bc92f377b2fb0e32..b869cdc5411893dcb6c3ef072f9d17a0d1a69d5a 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <linux/debugfs.h>
 #include <linux/device.h>
+#include <linux/pci.h>
 
 #include "hns_roce_device.h"
 
@@ -86,7 +87,7 @@ void hns_roce_register_debugfs(struct hns_roce_dev *hr_dev)
 {
        struct hns_roce_dev_debugfs *dbgfs = &hr_dev->dbgfs;
 
-       dbgfs->root = debugfs_create_dir(dev_name(&hr_dev->ib_dev.dev),
+       dbgfs->root = debugfs_create_dir(pci_name(hr_dev->pci_dev),
                                         hns_roce_dbgfs_root);
 
        create_sw_stat_debugfs(hr_dev, dbgfs->root);