Skip to content

Commit 370a935

Browse files
Yuyu Lirleon
authored andcommitted
RDMA/hns: Modify debugfs name
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: eb7854d ("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>
1 parent 377a209 commit 370a935

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/infiniband/hw/hns/hns_roce_debugfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <linux/debugfs.h>
77
#include <linux/device.h>
8+
#include <linux/pci.h>
89

910
#include "hns_roce_device.h"
1011

@@ -86,7 +87,7 @@ void hns_roce_register_debugfs(struct hns_roce_dev *hr_dev)
8687
{
8788
struct hns_roce_dev_debugfs *dbgfs = &hr_dev->dbgfs;
8889

89-
dbgfs->root = debugfs_create_dir(dev_name(&hr_dev->ib_dev.dev),
90+
dbgfs->root = debugfs_create_dir(pci_name(hr_dev->pci_dev),
9091
hns_roce_dbgfs_root);
9192

9293
create_sw_stat_debugfs(hr_dev, dbgfs->root);

0 commit comments

Comments
 (0)