Re: [PATCH v11 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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:
>> +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:
> 
>> +
>> +     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
> 



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux