mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1153/1285] Replace numeric parameter like 0444 with macro
@ 2016-08-02 12:21 Baole Ni
  0 siblings, 0 replies; only message in thread
From: Baole Ni @ 2016-08-02 12:21 UTC (permalink / raw)
  To: perex, tiwai, serge, davem, kadlec, m.szyprowski, kyungmin.park,
	k.kozlowski
  Cc: alsa-devel, linux-kernel, alexandre.belloni, chuansheng.liu,
	baolex.ni, aryabinin

I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
Signed-off-by: Baole Ni <baolex.ni@intel.com>
---
 sound/core/seq/seq.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sound/core/seq/seq.c b/sound/core/seq/seq.c
index 639544b..5b1c00e 100644
--- a/sound/core/seq/seq.c
+++ b/sound/core/seq/seq.c
@@ -58,19 +58,19 @@ MODULE_AUTHOR("Frank van de Pol <fvdpol@coil.demon.nl>, Jaroslav Kysela <perex@p
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer.");
 MODULE_LICENSE("GPL");
 
-module_param_array(seq_client_load, int, NULL, 0444);
+module_param_array(seq_client_load, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(seq_client_load, "The numbers of global (system) clients to load through kmod.");
-module_param(seq_default_timer_class, int, 0644);
+module_param(seq_default_timer_class, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(seq_default_timer_class, "The default timer class.");
-module_param(seq_default_timer_sclass, int, 0644);
+module_param(seq_default_timer_sclass, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(seq_default_timer_sclass, "The default timer slave class.");
-module_param(seq_default_timer_card, int, 0644);
+module_param(seq_default_timer_card, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(seq_default_timer_card, "The default timer card number.");
-module_param(seq_default_timer_device, int, 0644);
+module_param(seq_default_timer_device, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(seq_default_timer_device, "The default timer device number.");
-module_param(seq_default_timer_subdevice, int, 0644);
+module_param(seq_default_timer_subdevice, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(seq_default_timer_subdevice, "The default timer subdevice number.");
-module_param(seq_default_timer_resolution, int, 0644);
+module_param(seq_default_timer_resolution, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(seq_default_timer_resolution, "The default timer resolution in Hz.");
 
 MODULE_ALIAS_CHARDEV(CONFIG_SND_MAJOR, SNDRV_MINOR_SEQUENCER);
-- 
2.9.2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-02 13:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 12:21 [PATCH 1153/1285] Replace numeric parameter like 0444 with macro Baole Ni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®