public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sanjay R Mehta <sanmehta@amd.com>
To: Vinod Koul <vkoul@kernel.org>, Sanjay R Mehta <Sanju.Mehta@amd.com>
Cc: gregkh@linuxfoundation.org, dan.j.williams@intel.com,
	Thomas.Lendacky@amd.com, Shyam-sundar.S-k@amd.com,
	Nehal-bakulchandra.Shah@amd.com, robh@kernel.org,
	mchehab+samsung@kernel.org, davem@davemloft.net,
	linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org
Subject: Re: [PATCH v4 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA information
Date: Tue, 26 May 2020 11:40:08 +0530	[thread overview]
Message-ID: <280220fd-9780-e2b4-7a5a-26f3a0119c43@amd.com> (raw)
In-Reply-To: <20200504062002.GL1375924@vkoul-mobl>

>> +static const struct file_operations pt_debugfs_info_ops = {
>> +     .owner = THIS_MODULE,
>> +     .open = simple_open,
>> +     .read = ptdma_debugfs_info_read,
>> +     .write = NULL,
>> +};
>> +
>> +static const struct file_operations pt_debugfs_queue_ops = {
>> +     .owner = THIS_MODULE,
>> +     .open = simple_open,
>> +     .read = ptdma_debugfs_queue_read,
>> +     .write = ptdma_debugfs_queue_write,
>> +};
>> +
>> +static const struct file_operations pt_debugfs_stats_ops = {
>> +     .owner = THIS_MODULE,
>> +     .open = simple_open,
>> +     .read = ptdma_debugfs_stats_read,
>> +     .write = ptdma_debugfs_stats_write,
>> +};
> 
> pls convert to use DEFINE_SHOW_ATTRIBUTE()
> 
Sure, will incorporate the changes in next version of patch.

>> +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;
>> +
>> +     mutex_lock(&pt_debugfs_lock);
>> +     if (!pt_debugfs_dir)
>> +             pt_debugfs_dir = debugfs_create_dir(KBUILD_MODNAME, NULL);
>> +     mutex_unlock(&pt_debugfs_lock);
>> +
>> +     pt->debugfs_instance = debugfs_create_dir(pt->name, pt_debugfs_dir);
>> +
>> +     debugfs_create_file("info", 0400, pt->debugfs_instance, pt,
>> +                         &pt_debugfs_info_ops);
>> +
>> +     debugfs_create_file("stats", 0600, pt->debugfs_instance, pt,
>> +                         &pt_debugfs_stats_ops);
>> +
>> +     cmd_q = &pt->cmd_q;
>> +
>> +     snprintf(name, MAX_NAME_LEN - 1, "q");
>> +
>> +     debugfs_q_instance =
>> +             debugfs_create_dir(name, pt->debugfs_instance);
>> +
>> +     debugfs_create_file("stats", 0600, debugfs_q_instance, cmd_q,
>> +                         &pt_debugfs_queue_ops);
> 
> Pls use dbg_dev_root in struct dma_device as root for your own debugfs
> 
Sure, will incorporate the changes in next version of patch.

> Thanks
> --
> ~Vinod
> 

      reply	other threads:[~2020-05-26  6:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 21:13 [PATCH v4 0/3] Add support for AMD PTDMA controller driver Sanjay R Mehta
2020-04-28 21:13 ` [PATCH v4 1/3] dmaengine: ptdma: Initial driver for the AMD PTDMA controller Sanjay R Mehta
2020-05-04  5:55   ` Vinod Koul
2020-05-26  6:05     ` Sanjay R Mehta
2020-05-26  6:29       ` Greg KH
2020-05-26  6:36         ` Sanjay R Mehta
2020-04-28 21:13 ` [PATCH v4 2/3] dmaengine: ptdma: register PTDMA controller as a DMA resource Sanjay R Mehta
2020-05-04  6:14   ` Vinod Koul
2020-05-26  6:48     ` Sanjay R Mehta
2020-04-28 21:13 ` [PATCH v4 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA information Sanjay R Mehta
2020-05-04  6:20   ` Vinod Koul
2020-05-26  6:10     ` Sanjay R Mehta [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=280220fd-9780-e2b4-7a5a-26f3a0119c43@amd.com \
    --to=sanmehta@amd.com \
    --cc=Nehal-bakulchandra.Shah@amd.com \
    --cc=Sanju.Mehta@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=robh@kernel.org \
    --cc=vkoul@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