Skip to content

Commit c8e6939

Browse files
committed
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
2 parents 3b4b84b + 0f85c48 commit c8e6939

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/debugobjects.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,18 +1022,7 @@ static int debug_stats_show(struct seq_file *m, void *v)
10221022
seq_printf(m, "objs_freed :%d\n", debug_objects_freed);
10231023
return 0;
10241024
}
1025-
1026-
static int debug_stats_open(struct inode *inode, struct file *filp)
1027-
{
1028-
return single_open(filp, debug_stats_show, NULL);
1029-
}
1030-
1031-
static const struct file_operations debug_stats_fops = {
1032-
.open = debug_stats_open,
1033-
.read = seq_read,
1034-
.llseek = seq_lseek,
1035-
.release = single_release,
1036-
};
1025+
DEFINE_SHOW_ATTRIBUTE(debug_stats);
10371026

10381027
static int __init debug_objects_init_debugfs(void)
10391028
{

0 commit comments

Comments
 (0)