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 <[email protected]>
Signed-off-by: Baole Ni <[email protected]>
---
 drivers/firewire/ohci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 8bf8926..39f952b 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -347,7 +347,7 @@ static const struct {
 
 /* This overrides anything that was found in ohci_quirks[]. */
 static int param_quirks;
-module_param_named(quirks, param_quirks, int, 0644);
+module_param_named(quirks, param_quirks, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(quirks, "Chip quirks (default = 0"
        ", nonatomic cycle timer = "    __stringify(QUIRK_CYCLE_TIMER)
        ", reset packet generation = "  __stringify(QUIRK_RESET_PACKET)
@@ -364,7 +364,7 @@ MODULE_PARM_DESC(quirks, "Chip quirks (default = 0"
 #define OHCI_PARAM_DEBUG_BUSRESETS     8 /* only effective before chip init */
 
 static int param_debug;
-module_param_named(debug, param_debug, int, 0644);
+module_param_named(debug, param_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(debug, "Verbose logging (default = 0"
        ", AT/AR events = "     __stringify(OHCI_PARAM_DEBUG_AT_AR)
        ", self-IDs = "         __stringify(OHCI_PARAM_DEBUG_SELFIDS)
@@ -373,7 +373,7 @@ MODULE_PARM_DESC(debug, "Verbose logging (default = 0"
        ", or a combination, or all = -1)");
 
 static bool param_remote_dma;
-module_param_named(remote_dma, param_remote_dma, bool, 0444);
+module_param_named(remote_dma, param_remote_dma, bool, S_IRUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(remote_dma, "Enable unfiltered remote DMA (default = N)");
 
 static void log_irqs(struct fw_ohci *ohci, u32 evt)
-- 
2.9.2

Reply via email to