Merge tag 'core-debugobjects-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Aug 2020 21:24:18 +0000 (14:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Aug 2020 21:24:18 +0000 (14:24 -0700)
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

lib/debugobjects.c

index 48054db..fe45579 100644 (file)
@@ -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)
 {