summaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorYevgen Pronenko <y.pronenko@gmail.com>2017-07-10 18:47:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-10 19:32:30 -0400
commit0a1345f8fed962958047dc0148f94d9bed160824 (patch)
tree571608578bb4c11072b6b41726a811937e507877 /mm/memory.c
parent7a8f58f3918869dda0d71b2e9245baedbbe7bc5e (diff)
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@gmail.com Signed-off-by: Yevgen Pronenko <y.pronenko@gmail.com> Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c
index e31dd97e6114..cbb57194687e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3262,14 +3262,14 @@ static int fault_around_bytes_set(void *data, u64 val)
3262 fault_around_bytes = PAGE_SIZE; /* rounddown_pow_of_two(0) is undefined */ 3262 fault_around_bytes = PAGE_SIZE; /* rounddown_pow_of_two(0) is undefined */
3263 return 0; 3263 return 0;
3264} 3264}
3265DEFINE_SIMPLE_ATTRIBUTE(fault_around_bytes_fops, 3265DEFINE_DEBUGFS_ATTRIBUTE(fault_around_bytes_fops,
3266 fault_around_bytes_get, fault_around_bytes_set, "%llu\n"); 3266 fault_around_bytes_get, fault_around_bytes_set, "%llu\n");
3267 3267
3268static int __init fault_around_debugfs(void) 3268static int __init fault_around_debugfs(void)
3269{ 3269{
3270 void *ret; 3270 void *ret;
3271 3271
3272 ret = debugfs_create_file("fault_around_bytes", 0644, NULL, NULL, 3272 ret = debugfs_create_file_unsafe("fault_around_bytes", 0644, NULL, NULL,
3273 &fault_around_bytes_fops); 3273 &fault_around_bytes_fops);
3274 if (!ret) 3274 if (!ret)
3275 pr_warn("Failed to create fault_around_bytes in debugfs"); 3275 pr_warn("Failed to create fault_around_bytes in debugfs");