Re: [PATCH v11 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA
From: Sanjay R Mehta <hidden>
Date: 2021-08-05 13:25:45
Also in:
lkml
From: Sanjay R Mehta <hidden>
Date: 2021-08-05 13:25:45
Also in:
lkml
On 8/5/2021 5:54 PM, Greg KH wrote:
[CAUTION: External Email] On Mon, Aug 02, 2021 at 05:32:55AM -0500, Sanjay R Mehta wrote:quoted
+void ptdma_debugfs_setup(struct pt_device *pt) +{ + struct pt_cmd_queue *cmd_q; + char name[MAX_NAME_LEN + 1]; + struct dentry *debugfs_q_instance; + + if (!debugfs_initialized()) + return; + + debugfs_create_file("info", 0400, pt->dma_dev.dbg_dev_root, pt, + &pt_debugfs_info_fops); + + debugfs_create_file("stats", 0400, pt->dma_dev.dbg_dev_root, pt, + &pt_debugfs_stats_fops); + + cmd_q = &pt->cmd_q; + + snprintf(name, MAX_NAME_LEN - 1, "q");You are calling snprintf() to format a string to be "q"? Why? You can just do:quoted
+ + debugfs_q_instance = + debugfs_create_dir(name, pt->dma_dev.dbg_dev_root);debugfs_create_dir("q", pt->....) here instead.
Thanks Greg. Will make this change.
thanks, greg k-h