All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: speakup: Change symbolic permission from 'S_IRUGO' to '0444'
@ 2017-09-09  6:16 Meghana Madhyastha
  2017-09-09  6:52 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Meghana Madhyastha @ 2017-09-09  6:16 UTC (permalink / raw)
  To: outreachy-kernel, gregkh, w.d.hubbs, chris

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

Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
---
 drivers/staging/speakup/speakup_acntsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c
index 0e10404..4331584 100644
--- a/drivers/staging/speakup/speakup_acntsa.c
+++ b/drivers/staging/speakup/speakup_acntsa.c
@@ -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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: speakup: Change symbolic permission from 'S_IRUGO' to '0444'
  2017-09-09  6:16 [PATCH] Staging: speakup: Change symbolic permission from 'S_IRUGO' to '0444' Meghana Madhyastha
@ 2017-09-09  6:52 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2017-09-09  6:52 UTC (permalink / raw)
  To: Meghana Madhyastha; +Cc: outreachy-kernel, gregkh, w.d.hubbs, chris



On Sat, 9 Sep 2017, Meghana Madhyastha wrote:

> 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


>
> Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
> ---
>  drivers/staging/speakup/speakup_acntsa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c
> index 0e10404..4331584 100644
> --- a/drivers/staging/speakup/speakup_acntsa.c
> +++ b/drivers/staging/speakup/speakup_acntsa.c
> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> 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.
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-09  6:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-09  6:16 [PATCH] Staging: speakup: Change symbolic permission from 'S_IRUGO' to '0444' Meghana Madhyastha
2017-09-09  6:52 ` [Outreachy kernel] " Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.