From: Leon Romanovsky <leon@kernel.org>
To: Junxian Huang <huangjunxian6@hisilicon.com>
Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org, linuxarm@huawei.com,
linux-kernel@vger.kernel.org, tangchengchang@huawei.com
Subject: Re: [PATCH v2 for-rc 3/5] RDMA/hns: Modify debugfs name
Date: Wed, 30 Oct 2024 14:12:58 +0200 [thread overview]
Message-ID: <20241030121258.GB17187@unreal> (raw)
In-Reply-To: <20241024124000.2931869-4-huangjunxian6@hisilicon.com>
On Thu, Oct 24, 2024 at 08:39:58PM +0800, Junxian Huang wrote:
> From: Yuyu Li <liyuyu6@huawei.com>
>
> 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>
> ---
> drivers/infiniband/hw/hns/hns_roce_debugfs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_debugfs.c b/drivers/infiniband/hw/hns/hns_roce_debugfs.c
> index e8febb40f645..b869cdc54118 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_debugfs.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_debugfs.c
> @@ -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);
Let's take this change, but the more correct way is to add .rename()
callback to ib_device ops in similar way to what we do in ib_client
and call to debugfs_rename() from there.
See ib_device_rename() implementation for "lient->rename(ibdev, client_data);" call.
Thanks
next prev parent reply other threads:[~2024-10-30 12:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 12:39 [PATCH v2 for-rc 0/5] RDMA/hns: Bugfixes Junxian Huang
2024-10-24 12:39 ` [PATCH v2 for-rc 1/5] RDMA/hns: Fix an AEQE overflow error caused by untimely update of eq_db_ci Junxian Huang
2024-10-24 12:39 ` [PATCH v2 for-rc 2/5] RDMA/hns: Fix flush cqe error when racing with destroy qp Junxian Huang
2024-10-24 17:48 ` Zhu Yanjun
2024-10-24 12:39 ` [PATCH v2 for-rc 3/5] RDMA/hns: Modify debugfs name Junxian Huang
2024-10-30 12:12 ` Leon Romanovsky [this message]
2024-10-31 9:16 ` Junxian Huang
2024-10-24 12:39 ` [PATCH v2 for-rc 4/5] RDMA/hns: Use dev_* printings in hem code instead of ibdev_* Junxian Huang
2024-10-24 12:40 ` [PATCH v2 for-rc 5/5] RDMA/hns: Fix cpu stuck caused by printings during reset Junxian Huang
2024-10-30 12:14 ` [PATCH v2 for-rc 0/5] RDMA/hns: Bugfixes Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241030121258.GB17187@unreal \
--to=leon@kernel.org \
--cc=huangjunxian6@hisilicon.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=tangchengchang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.