All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next 0/3] debugfs: introduce debugfs_create_single/seq[,_data]
@ 2019-11-29  9:27 Kefeng Wang
  2019-11-29  9:27 ` [PATCH next 1/3] debugfs: Provide debugfs_[set|clear|test]_lowest_bit() Kefeng Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Kefeng Wang @ 2019-11-29  9:27 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: Kefeng Wang

Like proc_create_single/seq[,_data] in procfs, we could provide similar debugfs
helper to reduce losts of boilerplate code.

debugfs_create_single[,_data]
  creates a file in debugfs with the extra data and a seq_file show callback.
debugfs_create_seq[,_data]
  creates a file in debugfs with the extra data and a seq_operations.

There is a object dynamically allocated in the helper, which is used to store
extra data, we need free it when remove the debugfs file.

If the change is acceptable, we could change the caller one by one.

Kefeng Wang (3):
  debugfs: Provide debugfs_[set|clear|test]_lowest_bit()
  debugfs: introduce debugfs_create_single[,_data]
  debugfs: introduce debugfs_create_seq[,_data]

 fs/debugfs/file.c       | 127 +++++++++++++++++++++++++++++++++++-----
 fs/debugfs/inode.c      |  11 ++--
 fs/debugfs/internal.h   |   5 +-
 include/linux/debugfs.h |  34 +++++++++++
 4 files changed, 157 insertions(+), 20 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2019-12-03  9:33 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-29  9:27 [PATCH next 0/3] debugfs: introduce debugfs_create_single/seq[,_data] Kefeng Wang
2019-11-29  9:27 ` [PATCH next 1/3] debugfs: Provide debugfs_[set|clear|test]_lowest_bit() Kefeng Wang
2019-11-29  9:27 ` [PATCH next 2/3] debugfs: introduce debugfs_create_single[,_data] Kefeng Wang
2019-12-03  8:38   ` [PATCH next 2/3] debugfs: introduce debugfs_create_single[, _data] Dan Carpenter
2019-12-03  8:38     ` [PATCH next 2/3] debugfs: introduce debugfs_create_single[,_data] Dan Carpenter
2019-12-03  8:38     ` [PATCH next 2/3] debugfs: introduce debugfs_create_single[, _data] Dan Carpenter
2019-12-03  9:02     ` [kbuild-all] " Rong Chen
2019-12-03  9:02       ` [kbuild-all] Re: [PATCH next 2/3] debugfs: introduce debugfs_create_single[,_data] Rong Chen
2019-12-03  9:02       ` [PATCH next 2/3] debugfs: introduce debugfs_create_single[, _data] Rong Chen
2019-12-03  9:32       ` [kbuild-all] " Dan Carpenter
2019-12-03  9:32         ` [kbuild-all] Re: [PATCH next 2/3] debugfs: introduce debugfs_create_single[,_data] Dan Carpenter
2019-12-03  9:32         ` [PATCH next 2/3] debugfs: introduce debugfs_create_single[, _data] Dan Carpenter
2019-11-29  9:27 ` [PATCH next 3/3] debugfs: introduce debugfs_create_seq[,_data] Kefeng Wang
2019-11-29 14:22   ` Greg KH
2019-11-29 15:03     ` Kefeng Wang
2019-11-29 22:16       ` Greg KH
2019-11-29 14:21 ` [PATCH next 0/3] debugfs: introduce debugfs_create_single/seq[,_data] Greg KH
2019-11-29 15:16   ` Kefeng Wang
2019-11-29 22:19     ` Greg KH
2019-11-29 22:23       ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.