lkml.org 
[lkml]   [2022]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched/debug: use DEFINE_SEQ_ATTRIBUTE to simplify code
Date
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
\
 
 \ /
  Last update: 2022-09-24 12:07    [W:0.322 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site