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>
This commit is contained in:

committed by
Michael Ellerman

vanhempi
600ecc1936
commit
57ad583f20
@@ -93,10 +93,10 @@
|
||||
static DECLARE_BITMAP(default_enabled_hcalls, MAX_HCALL_OPCODE/4 + 1);
|
||||
|
||||
static int dynamic_mt_modes = 6;
|
||||
module_param(dynamic_mt_modes, int, S_IRUGO | S_IWUSR);
|
||||
module_param(dynamic_mt_modes, int, 0644);
|
||||
MODULE_PARM_DESC(dynamic_mt_modes, "Set of allowed dynamic micro-threading modes: 0 (= none), 2, 4, or 6 (= 2 or 4)");
|
||||
static int target_smt_mode;
|
||||
module_param(target_smt_mode, int, S_IRUGO | S_IWUSR);
|
||||
module_param(target_smt_mode, int, 0644);
|
||||
MODULE_PARM_DESC(target_smt_mode, "Target threads per core (0 = max)");
|
||||
|
||||
static bool indep_threads_mode = true;
|
||||
@@ -109,12 +109,10 @@ static struct kernel_param_ops module_param_ops = {
|
||||
.get = param_get_int,
|
||||
};
|
||||
|
||||
module_param_cb(kvm_irq_bypass, &module_param_ops, &kvm_irq_bypass,
|
||||
S_IRUGO | S_IWUSR);
|
||||
module_param_cb(kvm_irq_bypass, &module_param_ops, &kvm_irq_bypass, 0644);
|
||||
MODULE_PARM_DESC(kvm_irq_bypass, "Bypass passthrough interrupt optimization");
|
||||
|
||||
module_param_cb(h_ipi_redirect, &module_param_ops, &h_ipi_redirect,
|
||||
S_IRUGO | S_IWUSR);
|
||||
module_param_cb(h_ipi_redirect, &module_param_ops, &h_ipi_redirect, 0644);
|
||||
MODULE_PARM_DESC(h_ipi_redirect, "Redirect H_IPI wakeup to a free host core");
|
||||
#endif
|
||||
|
||||
|
@@ -1039,7 +1039,7 @@ static void xics_debugfs_init(struct kvmppc_xics *xics)
|
||||
return;
|
||||
}
|
||||
|
||||
xics->dentry = debugfs_create_file(name, S_IRUGO, powerpc_debugfs_root,
|
||||
xics->dentry = debugfs_create_file(name, 0444, powerpc_debugfs_root,
|
||||
xics, &xics_debug_fops);
|
||||
|
||||
pr_debug("%s: created %s\n", __func__, name);
|
||||
|
Viittaa uudesa ongelmassa
Block a user