summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/axonram.c
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2017-01-12 14:54:13 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-22 05:48:33 +1100
commit57ad583f2086d55ada284c54bfc440123cf73964 (patch)
tree5905e34d155068c69e6bfca05975b6d27f95ebce /arch/powerpc/sysdev/axonram.c
parent600ecc1936be075f611f299755e2de90b205eb82 (diff)
downloadlinux-0-day-57ad583f2086d55ada284c54bfc440123cf73964.tar.gz
linux-0-day-57ad583f2086d55ada284c54bfc440123cf73964.tar.xz
powerpc: Use octal numbers for file permissions
Symbolic macros are unintuitive and hard to read, whereas octal constants are much easier to interpret. Replace macros for the basic permission flags (user/group/other read/write/execute) with numeric constants instead, across the whole powerpc tree. Introducing a significant number of changes across the tree for no runtime benefit isn't exactly desirable, but so long as these macros are still used in the tree people will keep sending patches that add them. Not only are they hard to parse at a glance, there are multiple ways of coming to the same value (as you can see with 0444 and 0644 in this patch) which hurts readability. Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/sysdev/axonram.c')
-rw-r--r--arch/powerpc/sysdev/axonram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 1b307c80b4010..53b7f8ef570ff 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -83,7 +83,7 @@ axon_ram_sysfs_ecc(struct device *dev, struct device_attribute *attr, char *buf)
return sprintf(buf, "%ld\n", bank->ecc_counter);
}
-static DEVICE_ATTR(ecc, S_IRUGO, axon_ram_sysfs_ecc, NULL);
+static DEVICE_ATTR(ecc, 0444, axon_ram_sysfs_ecc, NULL);
/**
* axon_ram_irq_handler - interrupt handler for Axon RAM ECC