]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
of: be consistent in form of file mode
authorFrank Rowand <frank.rowand@sony.com>
Wed, 21 Jun 2017 19:20:03 +0000 (12:20 -0700)
committerRob Herring <robh@kernel.org>
Thu, 22 Jun 2017 16:16:44 +0000 (11:16 -0500)
checkpatch whined about using S_IRUGO instead of octal equivalent
when adding phandle sysfs code, so used octal in that pending 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>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/base.c

index 28d5f53bc631cadc9af2ca4ba4c54372de47b2a2..974d51269a0212527190ad1580bf4d116db51855 100644 (file)
@@ -155,7 +155,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;