[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220924104031.931600-1-liushixin2@huawei.com>
Date: Sat, 24 Sep 2022 18:40:31 +0800
From: Liu Shixin <liushixin2@...wei.com>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>,
"Mel Gorman" <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>
CC: <linux-kernel@...r.kernel.org>, Liu Shixin <liushixin2@...wei.com>
Subject: [PATCH] sched/debug: use DEFINE_SEQ_ATTRIBUTE to simplify code
Use DEFINE_SEQ_ATTRIBUTE to simplify code.
No functional change.
Signed-off-by: Liu Shixin <liushixin2@...wei.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
Powered by blists - more mailing lists