lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9d109c82-4c73-6e8e-ee8d-c6287495dc92@amd.com>
Date:   Thu, 5 Aug 2021 18:55:25 +0530
From:   Sanjay R Mehta <sanmehta@....com>
To:     Greg KH <gregkh@...uxfoundation.org>,
        Sanjay R Mehta <Sanju.Mehta@....com>
Cc:     vkoul@...nel.org, dan.j.williams@...el.com,
        Thomas.Lendacky@....com, Shyam-sundar.S-k@....com,
        Nehal-bakulchandra.Shah@....com, robh@...nel.org,
        mchehab+samsung@...nel.org, davem@...emloft.net,
        linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org
Subject: Re: [PATCH v11 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA



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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ