Messages in this thread Patch in this message | | | From | Liu Shixin <> | Subject | [PATCH] sched/debug: use DEFINE_SEQ_ATTRIBUTE to simplify code | Date | Sat, 24 Sep 2022 18:40:31 +0800 |
| |
Use DEFINE_SEQ_ATTRIBUTE to simplify code. No functional change.
Signed-off-by: Liu Shixin <liushixin2@huawei.com> --- kernel/sched/debug.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 6331aa4a4a14..83bf19a81bf0 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -246,17 +246,7 @@ __read_mostly bool sched_debug_verbose; static const struct seq_operations sched_debug_sops; -static int sched_debug_open(struct inode *inode, struct file *filp) -{ - return seq_open(filp, &sched_debug_sops); -} - -static const struct file_operations sched_debug_fops = { - .open = sched_debug_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; +DEFINE_SEQ_ATTRIBUTE(sched_debug); static struct dentry *debugfs_sched; -- 2.25.1
| |