lkml.org 
[lkml]   [2018]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] mm: Replace S_IWUSR with 0200
Date
Fix checkpatch warnings about S_IWUSR being less readable than
providing the permissions octal as '0200'.

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
---
mm/cma_debug.c | 4 ++--
mm/compaction.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/cma_debug.c b/mm/cma_debug.c
index 6494c7a7d257..f0af3f93d1e4 100644
--- a/mm/cma_debug.c
+++ b/mm/cma_debug.c
@@ -172,10 +172,10 @@ static void cma_debugfs_add_one(struct cma *cma, int idx)

tmp = debugfs_create_dir(name, cma_debugfs_root);

- debugfs_create_file("alloc", S_IWUSR, tmp, cma,
+ debugfs_create_file("alloc", 0200, tmp, cma,
&cma_alloc_fops);

- debugfs_create_file("free", S_IWUSR, tmp, cma,
+ debugfs_create_file("free", 0200, tmp, cma,
&cma_free_fops);

debugfs_create_file("base_pfn", 0444, tmp,
diff --git a/mm/compaction.c b/mm/compaction.c
index 88d01a50a015..50d0000a6afd 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1900,7 +1900,7 @@ static ssize_t sysfs_compact_node(struct device *dev,

return count;
}
-static DEVICE_ATTR(compact, S_IWUSR, NULL, sysfs_compact_node);
+static DEVICE_ATTR(compact, 0200, NULL, sysfs_compact_node);

int compaction_register_node(struct node *node)
{
--
2.16.2
\
 
 \ /
  Last update: 2018-04-07 20:48    [W:0.028 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site