* [PATCH 0836/1285] Replace numeric parameter like 0444 with macro
@ 2016-08-02 11:51 Baole Ni
0 siblings, 0 replies; only message in thread
From: Baole Ni @ 2016-08-02 11:51 UTC (permalink / raw)
To: konrad.wilk, boris.ostrovsky, david.vrabel, jgross, bhelgaas,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-pcmcia, linux-kernel, chuansheng.liu, baolex.ni
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>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-02 12:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 11:51 [PATCH 0836/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®