Skip to content

Add helper macro DEFINE_SHOW_STORE_ATTRIBUTE() at seq_file.c

Xingui Yang linux-scsi linux-usb lkml 2 versions – Applied

Status from this message: [merged mm-nonmm-stable] seq_file-add-helper-macro-to-define-attribute-for-rw-file.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 1 replyApplied 3/3
  2. v53 patches 5 repliesSuperseded

Changes in v6 from the cover letter

- Undelete the unused macros in qla_dfs.c and rewrite them using reference to the new macro on Andy's suggestion.
- Adjust some descriptions in commit based on Andy's suggestion.

Patches in v6 All 3 applied

#Subject and filesSizeRepliesApplied
1/3seq_file: Add helper macro to define attribute for rw fileinclude/linux/seq_file.h+15 -00 repliesApplied
2/3scsi: hisi_sas: Use DEFINE_SHOW_STORE_ATTRIBUTE() helper for debugfsdrivers/scsi/hisi_sas/hisi_sas_v3_hw.c+9 -1280 repliesApplied
3/3scsi: qla2xxx: Use DEFINE_SHOW_STORE_ATTRIBUTE() helper for debugfsdrivers/scsi/qla2xxx/qla_dfs.c+7 -521 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAndy Shevchenko
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/3] Add helper macro DEFINE_SHOW_STORE_ATTRIBUTE() at seq_file.c

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 duplicated code.

Changes from v5:
- Undelete the unused macros in qla_dfs.c and rewrite them using reference to the new macro on Andy's suggestion.
- Adjust some descriptions in commit based on Andy's suggestion.

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         |  59 ++---------
 include/linux/seq_file.h               |  15 +++
 3 files changed, 31 insertions(+), 180 deletions(-)
Signature · 1 line
2.17.1