Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1630312

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

From frowand.list@gmail.com
Newsgroups linux.kernel
Subject [PATCH v3 3/4] of: be consistent in form of file mode
Date 2017-04-25 11:00 +0200
Message-ID <tA4ud-2ow-3@gated-at.bofh.it> (permalink)
References <tA4ky-2l1-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Frank Rowand <frank.rowand@sony.com>

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 <frank.rowand@sony.com>
---
 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 41473b1e2445..9fe42346925b 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(&pp->attr);
 	pp->attr.attr.name = safe_name(&np->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 <frank.rowand@sony.com>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/4] of: remove *phandle properties from expanded device tree frowand.list@gmail.com - 2017-04-25 10:50 +0200
  [PATCH v3 1/4] of: remove *phandle properties from expanded device tree frowand.list@gmail.com - 2017-04-25 10:50 +0200
  [PATCH v3 3/4] of: be consistent in form of file mode frowand.list@gmail.com - 2017-04-25 11:00 +0200
  [PATCH v3 4/4] of: detect invalid phandle in overlay frowand.list@gmail.com - 2017-04-25 11:00 +0200
  Re: [PATCH v3 0/4] of: remove *phandle properties from expanded  device tree Frank Rowand <frowand.list@gmail.com> - 2017-04-25 11:00 +0200

csiph-web