summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-08-03 14:24:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-03 14:24:18 -0700
commitc8e69391d046a6acaa6a4cf72f9952ecd77d3085 (patch)
treee6759486c78e0d38ada6c57d0a73c863e56664cb /lib
parent3b4b84b2ea9938e44fffa356c7b95f496b4246ab (diff)
parent0f85c4805184765ff35e0079b3241ee8f25d1b2b (diff)
downloadlinux-c8e69391d046a6acaa6a4cf72f9952ecd77d3085.tar.bz2
Merge tag 'core-debugobjects-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull debugobjects cleanup from Ingo Molnar: "A single commit which simplifies a debugfs attribute definition" * tag 'core-debugobjects-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Convert to DEFINE_SHOW_ATTRIBUTE
Diffstat (limited to 'lib')
-rw-r--r--lib/debugobjects.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 48054dbf1b51..fe4557955d97 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -1022,18 +1022,7 @@ static int debug_stats_show(struct seq_file *m, void *v)
seq_printf(m, "objs_freed :%d\n", debug_objects_freed);
return 0;
}
-
-static int debug_stats_open(struct inode *inode, struct file *filp)
-{
- return single_open(filp, debug_stats_show, NULL);
-}
-
-static const struct file_operations debug_stats_fops = {
- .open = debug_stats_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(debug_stats);
static int __init debug_objects_init_debugfs(void)
{