[PATCH 1041/1285] Replace numeric parameter like 0444 with macro

From: Baole Ni
Date: Tue Aug 02 2016 - 10:42:45 EST


I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu <chuansheng.liu@xxxxxxxxx>
Signed-off-by: Baole Ni <baolex.ni@xxxxxxxxx>
---
fs/fuse/cuse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
index c5b6b71..5ca1348 100644
--- a/fs/fuse/cuse.c
+++ b/fs/fuse/cuse.c
@@ -573,7 +573,7 @@ static ssize_t cuse_class_waiting_show(struct device *dev,

return sprintf(buf, "%d\n", atomic_read(&cc->fc.num_waiting));
}
-static DEVICE_ATTR(waiting, 0400, cuse_class_waiting_show, NULL);
+static DEVICE_ATTR(waiting, S_IRUSR, cuse_class_waiting_show, NULL);

static ssize_t cuse_class_abort_store(struct device *dev,
struct device_attribute *attr,
@@ -584,7 +584,7 @@ static ssize_t cuse_class_abort_store(struct device *dev,
fuse_abort_conn(&cc->fc);
return count;
}
-static DEVICE_ATTR(abort, 0200, NULL, cuse_class_abort_store);
+static DEVICE_ATTR(abort, S_IWUSR, NULL, cuse_class_abort_store);

static struct attribute *cuse_class_dev_attrs[] = {
&dev_attr_waiting.attr,
--
2.9.2