From: Nishanth Menon <nm@ti.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Santosh Shilimkar <ssantosh@kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] soc: ti: knav_qmss: remove debugfs file on teardown
Date: Mon, 29 Jun 2026 08:12:40 -0500 [thread overview]
Message-ID: <20260629131240.bkesmillqykrzrac@harddisk> (raw)
In-Reply-To: <20260615091251.7129-1-pengpeng@iscas.ac.cn>
On 17:12-20260615, Pengpeng Hou wrote:
> knav_queue_probe() creates the global qmss debugfs file whose show
> callback reads the global kdev state. knav_queue_remove() disables
> runtime PM but leaves the debugfs file and ready state published.
>
> Save the debugfs dentry, remove it during teardown, and clear the global
> ready pointer state.
Please update the commit message once you have rebased.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
> drivers/soc/ti/knav_qmss_queue.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
Please rebase to v7.2-rc1 or the latest linux-next please. The patch no
longer applies.
>
> diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
> index 86d7a9c9ae01..1cc2e4a90c0d 100644
> --- a/drivers/soc/ti/knav_qmss_queue.c
> +++ b/drivers/soc/ti/knav_qmss_queue.c
> @@ -26,6 +26,7 @@
> #include "knav_qmss.h"
>
> static struct knav_device *kdev;
> +static struct dentry *knav_queue_debugfs;
Does this belong to knav_device?
> static DEFINE_MUTEX(knav_dev_lock);
> #define knav_dev_lock_held() \
> lockdep_is_held(&knav_dev_lock)
> @@ -1857,8 +1858,9 @@ static int knav_queue_probe(struct platform_device *pdev)
> goto err;
> }
>
> - debugfs_create_file("qmss", S_IFREG | S_IRUGO, NULL, NULL,
> - &knav_queue_debug_fops);
> + knav_queue_debugfs = debugfs_create_file("qmss", 0444,
I think the 0444 change was triggered by checkpatch.pl? Lets document
the change in commit message?
> + NULL, NULL,
> + &knav_queue_debug_fops);
> device_ready = true;
> return 0;
>
> @@ -1873,9 +1875,14 @@ static int knav_queue_probe(struct platform_device *pdev)
>
> static void knav_queue_remove(struct platform_device *pdev)
> {
> + device_ready = false;
This should already be present.
> + debugfs_remove(knav_queue_debugfs);
> + knav_queue_debugfs = NULL;
> +
> /* TODO: Free resources */
> pm_runtime_put_sync(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> + kdev = NULL;
I think we renamed this in recent patches. knav_qdev = NULL and should
get the memory released once the remove function returns back?
> }
>
> static struct platform_driver keystone_qmss_driver = {
> --
> 2.50.1 (Apple Git-155)
>
>
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
prev parent reply other threads:[~2026-06-29 13:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 9:12 [PATCH] soc: ti: knav_qmss: remove debugfs file on teardown Pengpeng Hou
2026-06-29 13:12 ` Nishanth Menon [this message]
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=20260629131240.bkesmillqykrzrac@harddisk \
--to=nm@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pengpeng@iscas.ac.cn \
--cc=ssantosh@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox