[PATCH 0836/1285] Replace numeric parameter like 0444 with macro

Baole Ni baolex.ni at intel.com
Tue Aug 2 04:51:12 PDT 2016


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 at intel.com>
Signed-off-by: Baole Ni <baolex.ni at intel.com>
---
 drivers/pcmcia/tcic.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c
index 1ee63e5..eb000d8 100644
--- a/drivers/pcmcia/tcic.c
+++ b/drivers/pcmcia/tcic.c
@@ -85,15 +85,15 @@ static int poll_quick = HZ/20;
 /* CCLK external clock time, in nanoseconds.  70 ns = 14.31818 MHz */
 static int cycle_time = 70;
 
-module_param(tcic_base, ulong, 0444);
-module_param(ignore, int, 0444);
-module_param(do_scan, int, 0444);
-module_param(irq_mask, int, 0444);
-module_param_array(irq_list, int, &irq_list_count, 0444);
-module_param(cs_irq, int, 0444);
-module_param(poll_interval, int, 0444);
-module_param(poll_quick, int, 0444);
-module_param(cycle_time, int, 0444);
+module_param(tcic_base, ulong, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(ignore, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(do_scan, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(irq_mask, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_array(irq_list, int, &irq_list_count, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(cs_irq, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(poll_interval, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(poll_quick, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(cycle_time, int, S_IRUSR | S_IRGRP | S_IROTH);
 
 /*====================================================================*/
 
-- 
2.9.2




More information about the linux-pcmcia mailing list