The patch titled Subject: mm/memory.c: convert to DEFINE_DEBUGFS_ATTRIBUTE has been added to the -mm tree. Its filename is mm-convert-to-define_debugfs_attribute.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-convert-to-define_debugfs_attribute.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-convert-to-define_debugfs_attribute.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Yevgen Pronenko <y.pronenko@xxxxxxxxx> Subject: mm/memory.c: convert to DEFINE_DEBUGFS_ATTRIBUTE The preferred strategy to define debugfs attributes is to use the DEFINE_DEBUGFS_ATTRIBUTE() macro and to use debugfs_create_file_unsafe(). Link: http://lkml.kernel.org/r/20170528145948.32127-1-y.pronenko@xxxxxxxxx Signed-off-by: Yevgen Pronenko <y.pronenko@xxxxxxxxx> Cc: "Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN mm/memory.c~mm-convert-to-define_debugfs_attribute mm/memory.c --- a/mm/memory.c~mm-convert-to-define_debugfs_attribute +++ a/mm/memory.c @@ -3300,14 +3300,14 @@ static int fault_around_bytes_set(void * fault_around_bytes = PAGE_SIZE; /* rounddown_pow_of_two(0) is undefined */ return 0; } -DEFINE_SIMPLE_ATTRIBUTE(fault_around_bytes_fops, +DEFINE_DEBUGFS_ATTRIBUTE(fault_around_bytes_fops, fault_around_bytes_get, fault_around_bytes_set, "%llu\n"); static int __init fault_around_debugfs(void) { void *ret; - ret = debugfs_create_file("fault_around_bytes", 0644, NULL, NULL, + ret = debugfs_create_file_unsafe("fault_around_bytes", 0644, NULL, NULL, &fault_around_bytes_fops); if (!ret) pr_warn("Failed to create fault_around_bytes in debugfs"); _ Patches currently in -mm which might be from y.pronenko@xxxxxxxxx are mm-convert-to-define_debugfs_attribute.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html