Re: [PATCH] dmaengine: pl08x: Create debugfs stats file under device folder

Frank Li <[email protected]>
Newsgroups org.kernel.vger.dmaengine
Message-ID <an-FVzIRAGMj8hX_@lizhi-Precision-Tower-5810>
On Fri, Jul 24, 2026 at 12:17:39AM +0300, Vladimir Zapolskiy wrote:
> If parent folder for a debug file is not set, then this file is created
> right in top debugfs mountpoint directory, which is undesired. However
> for every DMA controller device its dedicated folder below 'dmaengine'
> is created by dma_async_device_register(), and this particular folder
> is expected to store all device specific debug files.
>
> The new name "stats" is selected as the most popular debugfs file name
> found in other DMA controller device drivers, and the macro constant
> for file mode is replaced by the octal value.
>
> Signed-off-by: Vladimir Zapolskiy <[email protected]>
> ---

Reviewed-by: Frank Li <[email protected]>

>  drivers/dma/amba-pl08x.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index 5e88fd44812d..543c2eb8cfa8 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -2500,8 +2500,8 @@ DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs);
>  static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
>  {
>  	/* Expose a simple debugfs interface to view all clocks */
> -	debugfs_create_file(dev_name(&pl08x->adev->dev), S_IFREG | S_IRUGO,
> -			    NULL, pl08x, &pl08x_debugfs_fops);
> +	debugfs_create_file("stats", 0444, pl08x->memcpy.dbg_dev_root,
> +			    pl08x, &pl08x_debugfs_fops);
>  }
>
>  #else
> --
> 2.51.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.