From: miaoqinglang <miaoqinglang@huawei.com>
To: John Garry <john.garry@huawei.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH -next] scsi: hisi_sas: Convert to DEFINE_SHOW_ATTRIBUTE
Date: Thu, 16 Jul 2020 21:04:07 +0800 [thread overview]
Message-ID: <98e26dfe-b6f9-5730-097e-95ff2db5c987@huawei.com> (raw)
In-Reply-To: <801e6d49-9bd5-8079-bb83-9f67591a9158@huawei.com>
在 2020/7/16 17:25, John Garry 写道:
> On 16/07/2020 09:47, Qinglang Miao wrote:
>
> Not sure why you cc Greg, but SCSI maintainers should have been -
> James and Martin
>
>> From: Yongqiang Liu <liuyongqiang13@huawei.com>
>>
>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>
>> Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
>
> The sender is not the author, so your signed-off-by should also be
> here (after sign off from Yongqiang Liu)
>
Sorry for not knowing this rule, I will send a new patch later on if you
don't mind.
>> ---
>> drivers/scsi/hisi_sas/hisi_sas_main.c | 137 ++------------------------
>> 1 file changed, 10 insertions(+), 127 deletions(-)
>>
>> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c
>> b/drivers/scsi/hisi_sas/hisi_sas_main.c
>> index 852d2620e..f50b0c78f 100644
>> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
>> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
>> @@ -2870,19 +2870,7 @@ static int hisi_sas_debugfs_global_show(struct
>> seq_file *s, void *p)
>> return 0;
>> }
>> -static int hisi_sas_debugfs_global_open(struct inode *inode,
>> struct file *filp)
>> -{
>> - return single_open(filp, hisi_sas_debugfs_global_show,
>> - inode->i_private);
>> -}
>> -
>> -static const struct file_operations hisi_sas_debugfs_global_fops = {
>> - .open = hisi_sas_debugfs_global_open,
>> - .read_iter = seq_read_iter,
>> - .llseek = seq_lseek,
>> - .release = single_release,
>> - .owner = THIS_MODULE,
>> -};
>> +DEFINE_SHOW_ATTRIBUTE(hisi_sas_debugfs_global);
>
> I couldn't see an equivalent for file_operations which have a read and
> write method, and the driver has a few of those.
Yes, you're right. There's no equivalence when drivers have read and
write method. So the file_operations we cleaned up are those without
write method, like hisi_sas_debugfs_global_fops.
>
> Thanks
> .
Thanks
.
next prev parent reply other threads:[~2020-07-16 13:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 8:47 Qinglang Miao
2020-07-16 9:25 ` John Garry
2020-07-16 13:04 ` miaoqinglang [this message]
2020-07-16 12:39 ` luojiaxing
2020-07-17 2:17 ` miaoqinglang
2020-09-19 2:32 ` miaoqinglang
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=98e26dfe-b6f9-5730-097e-95ff2db5c987@huawei.com \
--to=miaoqinglang@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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
all inboxes | Powered by JetHome®