[PATCH 0584/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni
Date: Tue Aug 02 2016 - 10:57:23 EST
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@xxxxxxxxx>
Signed-off-by: Baole Ni <baolex.ni@xxxxxxxxx>
---
drivers/media/usb/cx231xx/cx231xx-video.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index 6414188..56fb362 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -54,7 +54,7 @@
dev->name, __func__ , ##arg); } while (0)
static unsigned int isoc_debug;
-module_param(isoc_debug, int, 0644);
+module_param(isoc_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(isoc_debug, "enable debug messages [isoc transfers]");
#define cx231xx_isocdbg(fmt, arg...) \
@@ -75,10 +75,10 @@ static unsigned int video_nr[] = {[0 ... (CX231XX_MAXBOARDS - 1)] = UNSET };
static unsigned int vbi_nr[] = {[0 ... (CX231XX_MAXBOARDS - 1)] = UNSET };
static unsigned int radio_nr[] = {[0 ... (CX231XX_MAXBOARDS - 1)] = UNSET };
-module_param_array(card, int, NULL, 0444);
-module_param_array(video_nr, int, NULL, 0444);
-module_param_array(vbi_nr, int, NULL, 0444);
-module_param_array(radio_nr, int, NULL, 0444);
+module_param_array(card, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(video_nr, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(vbi_nr, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(radio_nr, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(card, "card type");
MODULE_PARM_DESC(video_nr, "video device numbers");
@@ -86,7 +86,7 @@ MODULE_PARM_DESC(vbi_nr, "vbi device numbers");
MODULE_PARM_DESC(radio_nr, "radio device numbers");
static unsigned int video_debug;
-module_param(video_debug, int, 0644);
+module_param(video_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(video_debug, "enable debug messages [video]");
/* supported video standards */
--
2.9.2