Skip to contentSkip to conversation

Staging: speakup: Change symbolic permission from 'S_IRUGO' to '0444'

PATCH In review Meghana Madhyastha 2 participants 2 messages Sep 9, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: speakup: Change symbolic permission from 'S_IRUGO' to '0444'

This fixes the following warning reported by checkpath.pl.
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.

---
 drivers/staging/speakup/speakup_acntsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/speakup_acntsa.c +1 -1
index 0e10404..4331584 100644
@@ -136,7 +136,7 @@ static int synth_probe(struct spk_synth *synth)
 }
 
 module_param_named(ser, synth_acntsa.ser, int, 0444);
-module_param_named(dev, synth_acntsa.dev_name, charp, S_IRUGO);
+module_param_named(dev, synth_acntsa.dev_name, charp, 0444);
 module_param_named(start, synth_acntsa.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
Signature · 1 line
2.7.4
#1 lore raw
Quoted 2 lines · Meghana Madhyastha

This fixes the following warning reported by checkpath.pl.
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.

It could be good to change the distribution of information between the subject line and the commit log. The subject line should be concise and give a quick idea of what the patch is about. It doesn't need to have all the details. So it could be eg "Replace symbolic permission". Now one has the idea, and if one is interested in more details one can look at the commit log.

Then the commit log should say what you did and why you did it. "Fix" doesn't really say anything about what you did, and just following a tool is not the best reason why (although in some simple cases it can be hard to think of anything else). Still it is nice to give credit to the tool that helped you find the issue.

So you could say:

Replace S_IRUGO by 0444 in module parameter declaration. 0444 is more readable and matches the style used in other declarations nearby.

Problem found using checkpatch.

The actual checkpatch message is not so important. In this case it also goes past 80 characters, so if you really want to include it, you should add a newline somewhere.

julia

Quoted 29 lines
---
 drivers/staging/speakup/speakup_acntsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/speakup_acntsa.c +1 -2
index 0e10404..4331584 100644
@@ -136,7 +136,7 @@ static int synth_probe(struct spk_synth *synth)
 }
 
 module_param_named(ser, synth_acntsa.ser, int, 0444);
-module_param_named(dev, synth_acntsa.dev_name, charp, S_IRUGO);
+module_param_named(dev, synth_acntsa.dev_name, charp, 0444);
 module_param_named(start, synth_acntsa.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170909061641.GA19737%40meghana-HP-Pavilion-Notebook.
For more options, visit https://groups.google.com/d/optout.