public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Add helper macro DEFINE_SHOW_STORE_ATTRIBUTE at seq_file.c
@ 2023-09-04  8:48 Xingui Yang
  2023-09-04  8:48 ` [PATCH v5 1/3] seq_file: Add helper macro to define attribute for rw file Xingui Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Xingui Yang @ 2023-09-04  8:48 UTC (permalink / raw)
  To: jejb, martin.petersen, john.g.garry, damien.lemoal
  Cc: andriy.shevchenko, akpm, viro, himanshu.madhani, felipe.balbi,
	gregkh, uma.shankar, anshuman.gupta, animesh.manna, linux-usb,
	linux-scsi, linux-kernel, linuxarm, yangxingui, prime.zeng,
	kangfenglong, chenxiang66

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 helper macro to reduce duplicate code.

Changes from v4:
- Reduce the scope to scsi subsystem based on Andy's suggestion.
- Remove unused macros in qla_dfs.c
- Adjust some descriptions in commit.

Changes from v3:
- Add AI Viro's comment to v1->v2's revision description.
- Fixed a spelling mistakes of "marco" to "macro".

Changes from v2:
- Fixed some spelling mistakes in commit.
- Revision description are added for easy tracing.

Changes from v1:
- Rename DEFINE_STORE_ATTRIBUTE() to DEFINE_SHOW_STORE_ATTRIBUTE().
- AI Viro points out that he doesn't like the definition of macros
  like DEFINE_SHOW_ATTRIBUTE.


Luo Jiaxing (3):
  seq_file: Add helper macro to define attribute for rw file
  scsi: hisi_sas: Use DEFINE_SHOW_STORE_ATTRIBUTE helper for debugfs
  scsi: qla2xxx: Use DEFINE_SHOW_STORE_ATTRIBUTE helper for debugfs

 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 137 ++-----------------------
 drivers/scsi/qla2xxx/qla_dfs.c         | 113 +-------------------
 include/linux/seq_file.h               |  15 +++
 3 files changed, 26 insertions(+), 239 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-09-04 13:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox