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

Baole Ni baolex.ni at intel.com
Tue Aug 2 11:58:13 UTC 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/staging/comedi/drivers/ni_65xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c
index 251117b..fd73efa 100644
--- a/drivers/staging/comedi/drivers/ni_65xx.c
+++ b/drivers/staging/comedi/drivers/ni_65xx.c
@@ -271,7 +271,7 @@ static const struct ni_65xx_board ni_65xx_boards[] = {
 
 static bool ni_65xx_legacy_invert_outputs;
 module_param_named(legacy_invert_outputs, ni_65xx_legacy_invert_outputs,
-		   bool, 0444);
+		   bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(legacy_invert_outputs,
 		 "invert outputs of PCI/PXI-6513/6514/6515/6516/6517/6518/6519 for compatibility with old user code");
 
-- 
2.9.2



More information about the devel mailing list