From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: yangxingui <yangxingui@huawei.com>
Cc: jejb@linux.ibm.com, martin.petersen@oracle.com,
john.g.garry@oracle.com, damien.lemoal@opensource.wdc.com,
akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
himanshu.madhani@cavium.com, felipe.balbi@linux.intel.com,
gregkh@linuxfoundation.org, uma.shankar@intel.com,
anshuman.gupta@intel.com, animesh.manna@intel.com,
linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxarm@huawei.com,
prime.zeng@hisilicon.com, kangfenglong@huawei.com,
chenxiang66@hisilicon.com
Subject: Re: [PATCH v5 3/3] scsi: qla2xxx: Use DEFINE_SHOW_STORE_ATTRIBUTE helper for debugfs
Date: Mon, 4 Sep 2023 16:45:53 +0300 [thread overview]
Message-ID: <ZPXfkV7DYsxx179W@smile.fi.intel.com> (raw)
In-Reply-To: <6408e1c5-df6a-e257-26c8-2d100be6db97@huawei.com>
On Mon, Sep 04, 2023 at 09:05:29PM +0800, yangxingui wrote:
> On 2023/9/4 18:56, Andy Shevchenko wrote:
> > On Mon, Sep 04, 2023 at 08:48:04AM +0000, Xingui Yang wrote:
...
> > > -/*
> > > - * Helper macros for setting up debugfs entries.
> > > - * _name: The name of the debugfs entry
> > > - * _ctx_struct: The context that was passed when creating the debugfs file
> > > - *
> > > - * QLA_DFS_SETUP_RD could be used when there is only a show function.
> > > - * - show function take the name qla_dfs_<sysfs-name>_show
> > > - *
> > > - * QLA_DFS_SETUP_RW could be used when there are both show and write functions.
> > > - * - show function take the name qla_dfs_<sysfs-name>_show
> > > - * - write function take the name qla_dfs_<sysfs-name>_write
> > > - *
> > > - * To have a new debugfs entry, do:
> > > - * 1. Create a "struct dentry *" in the appropriate structure in the format
> > > - * dfs_<sysfs-name>
> > > - * 2. Setup debugfs entries using QLA_DFS_SETUP_RD / QLA_DFS_SETUP_RW
> > > - * 3. Create debugfs file in qla2x00_dfs_setup() using QLA_DFS_CREATE_FILE
> > > - * or QLA_DFS_ROOT_CREATE_FILE
> > > - * 4. Remove debugfs file in qla2x00_dfs_remove() using QLA_DFS_REMOVE_FILE
> > > - * or QLA_DFS_ROOT_REMOVE_FILE
> > > - *
> > > - * Example for creating "TEST" sysfs file:
> > > - * 1. struct qla_hw_data { ... struct dentry *dfs_TEST; }
> > > - * 2. QLA_DFS_SETUP_RD(TEST, scsi_qla_host_t);
> > > - * 3. In qla2x00_dfs_setup():
> > > - * QLA_DFS_CREATE_FILE(ha, TEST, 0600, ha->dfs_dir, vha);
> > > - * 4. In qla2x00_dfs_remove():
> > > - * QLA_DFS_REMOVE_FILE(ha, TEST);
> > > - */
> >
> > I believe this comment (in some form) has to be preserved.
> > Try to rewrite it using reference to the new macro.
> Thanks for your reply, I checked and these macros aren't being called
> anywhere else, so I decided to delete them all. Of course, maybe this macro
> will be used in the future, and I can resubmit another version based on your
> suggestion.
Of course you need to rewrite it to use new approach.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2023-09-04 13:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 8:48 [PATCH v5 0/3] Add helper macro DEFINE_SHOW_STORE_ATTRIBUTE at seq_file.c Xingui Yang
2023-09-04 8:48 ` [PATCH v5 1/3] seq_file: Add helper macro to define attribute for rw file Xingui Yang
2023-09-04 10:53 ` Andy Shevchenko
2023-09-04 8:48 ` [PATCH v5 2/3] scsi: hisi_sas: Use DEFINE_SHOW_STORE_ATTRIBUTE helper for debugfs Xingui Yang
2023-09-04 10:55 ` Andy Shevchenko
2023-09-04 8:48 ` [PATCH v5 3/3] scsi: qla2xxx: " Xingui Yang
2023-09-04 10:56 ` Andy Shevchenko
2023-09-04 13:05 ` yangxingui
2023-09-04 13:45 ` Andy Shevchenko [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=ZPXfkV7DYsxx179W@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=animesh.manna@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=chenxiang66@hisilicon.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=himanshu.madhani@cavium.com \
--cc=jejb@linux.ibm.com \
--cc=john.g.garry@oracle.com \
--cc=kangfenglong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=martin.petersen@oracle.com \
--cc=prime.zeng@hisilicon.com \
--cc=uma.shankar@intel.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yangxingui@huawei.com \
/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