[PATCH v5 3/4] of: be consistent in form of file mode

2017-06-09 Thread frowand . list
From: Frank Rowand 

checkpatch whined about using S_IRUGO instead of octal equivalent
when adding phandle sysfs code, so used octal in that patch.
Change other instances of the S_* constants in the same file to
the octal form.

Signed-off-by: Frank Rowand 
---
 drivers/of/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 941c9a03471d..a4e2159c8671 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -168,7 +168,7 @@ int __of_add_property_sysfs(struct device_node *np, struct 
property *pp)
 
sysfs_bin_attr_init(>attr);
pp->attr.attr.name = safe_name(>kobj, pp->name);
-   pp->attr.attr.mode = secure ? S_IRUSR : S_IRUGO;
+   pp->attr.attr.mode = secure ? 0400 : 0444;
pp->attr.size = secure ? 0 : pp->length;
pp->attr.read = of_node_property_read;
 
-- 
Frank Rowand 



[PATCH v5 3/4] of: be consistent in form of file mode

2017-06-09 Thread frowand . list
From: Frank Rowand 

checkpatch whined about using S_IRUGO instead of octal equivalent
when adding phandle sysfs code, so used octal in that patch.
Change other instances of the S_* constants in the same file to
the octal form.

Signed-off-by: Frank Rowand 
---
 drivers/of/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 941c9a03471d..a4e2159c8671 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -168,7 +168,7 @@ int __of_add_property_sysfs(struct device_node *np, struct 
property *pp)
 
sysfs_bin_attr_init(>attr);
pp->attr.attr.name = safe_name(>kobj, pp->name);
-   pp->attr.attr.mode = secure ? S_IRUSR : S_IRUGO;
+   pp->attr.attr.mode = secure ? 0400 : 0444;
pp->attr.size = secure ? 0 : pp->length;
pp->attr.read = of_node_property_read;
 
-- 
Frank Rowand