mbox series

[v3,0/5] Introduce a new helper marco DEFINE_SHOW_STORE_ATTRIBUTE at seq_file.c

Message ID 1604406584-53926-1-git-send-email-luojiaxing@huawei.com (mailing list archive)
Headers show
Series Introduce a new helper marco DEFINE_SHOW_STORE_ATTRIBUTE at seq_file.c | expand

Message

luojiaxing Nov. 3, 2020, 12:29 p.m. UTC
We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute
for read-only file, but we found many of drivers also want a helper macro
for read-write file too.

So we add this macro to help decrease code duplication.

---
 v1->v2:
        1.Rename DEFINE_STORE_ATTRIBUTE() to DEFINE_SHOW_STORE_ATTRIBUTE().
 v2->v3:
        1.Fixed some spelling mistakes in commit.
        2.Revised resumes are added for easy tracing.
---

Luo Jiaxing (5):
  seq_file: Introduce DEFINE_SHOW_STORE_ATTRIBUTE() helper macro
  scsi: hisi_sas: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs
  scsi: qla2xxx: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs
  usb: dwc3: debugfs: Introduce DEFINE_SHOW_STORE_ATTRIBUTE
  drm/i915/display: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

 .../gpu/drm/i915/display/intel_display_debugfs.c   |  55 +--------
 drivers/scsi/hisi_sas/hisi_sas_main.c              | 135 +++------------------
 drivers/scsi/qla2xxx/qla_dfs.c                     |  19 +--
 drivers/usb/dwc3/debugfs.c                         |  52 +-------
 include/linux/seq_file.h                           |  15 +++
 5 files changed, 41 insertions(+), 235 deletions(-)

Comments

Greg KH Nov. 3, 2020, 1:36 p.m. UTC | #1
On Tue, Nov 03, 2020 at 08:29:39PM +0800, Luo Jiaxing wrote:
> We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute
> for read-only file, but we found many of drivers also want a helper macro
> for read-write file too.
> 
> So we add this macro to help decrease code duplication.
> 
> ---
>  v1->v2:
>         1.Rename DEFINE_STORE_ATTRIBUTE() to DEFINE_SHOW_STORE_ATTRIBUTE().
>  v2->v3:
>         1.Fixed some spelling mistakes in commit.
>         2.Revised resumes are added for easy tracing.

You forgot to address Al Viro's review comments :(
Alan Stern Nov. 3, 2020, 1:45 p.m. UTC | #2
On Tue, Nov 03, 2020 at 02:36:44PM +0100, Greg KH wrote:
> On Tue, Nov 03, 2020 at 08:29:39PM +0800, Luo Jiaxing wrote:
> > We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute
> > for read-only file, but we found many of drivers also want a helper macro
> > for read-write file too.
> > 
> > So we add this macro to help decrease code duplication.
> > 
> > ---
> >  v1->v2:
> >         1.Rename DEFINE_STORE_ATTRIBUTE() to DEFINE_SHOW_STORE_ATTRIBUTE().
> >  v2->v3:
> >         1.Fixed some spelling mistakes in commit.
> >         2.Revised resumes are added for easy tracing.
> 
> You forgot to address Al Viro's review comments :(

You also might want to fix the type in the Subject line ("marco" instead 
of "macro").

Alan Stern
luojiaxing Nov. 5, 2020, 11:05 a.m. UTC | #3
Hi, Greg

On 2020/11/3 21:36, Greg KH wrote:
> On Tue, Nov 03, 2020 at 08:29:39PM +0800, Luo Jiaxing wrote:
>> We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute
>> for read-only file, but we found many of drivers also want a helper macro
>> for read-write file too.
>>
>> So we add this macro to help decrease code duplication.
>>
>> ---
>>   v1->v2:
>>          1.Rename DEFINE_STORE_ATTRIBUTE() to DEFINE_SHOW_STORE_ATTRIBUTE().
>>   v2->v3:
>>          1.Fixed some spelling mistakes in commit.
>>          2.Revised resumes are added for easy tracing.
> You forgot to address Al Viro's review comments :(


Yes, I remember that AI Viro point out that he don't want this, but Andy 
reply later and suggest me to modify the naming,

So I send a v2 for review.


Actually I am not sure about what you mean by " forgot to address Al 
Viro's review comments ". Should I add AI Viro's review comments at my 
changes description?


Thanks

Jiaxing


>
>
> .
>
luojiaxing Nov. 5, 2020, 11:08 a.m. UTC | #4
Hi , Alan

On 2020/11/3 21:45, Alan Stern wrote:
> On Tue, Nov 03, 2020 at 02:36:44PM +0100, Greg KH wrote:
>> On Tue, Nov 03, 2020 at 08:29:39PM +0800, Luo Jiaxing wrote:
>>> We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute
>>> for read-only file, but we found many of drivers also want a helper macro
>>> for read-write file too.
>>>
>>> So we add this macro to help decrease code duplication.
>>>
>>> ---
>>>   v1->v2:
>>>          1.Rename DEFINE_STORE_ATTRIBUTE() to DEFINE_SHOW_STORE_ATTRIBUTE().
>>>   v2->v3:
>>>          1.Fixed some spelling mistakes in commit.
>>>          2.Revised resumes are added for easy tracing.
>> You forgot to address Al Viro's review comments :(
> You also might want to fix the type in the Subject line ("marco" instead
> of "macro").


I'm sorry for such an obvious spelling error. Thanks for pointing out 
and it will be fixed in v4.


Jiaxing


>
> Alan Stern
>
> .
>