Skip to contentSkip to conversation

Replace numeric parameter like 0444 with macro

PATCH NAK Baole Ni 1 participant 1 message Aug 2, 2016

Subsystems (3)
lore
Share & tools
lore

Baole Ni

author
#0 lore raw

PATCH 738/1285 Replace numeric parameter like 0444 with macro

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.

---
 drivers/net/ethernet/sis/sis900.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/sis/sis900.c +3 -3
index 95001ee4..96eef0d 100644
@@ -197,9 +197,9 @@ MODULE_AUTHOR("Jim Huang <[email protected]>, Ollie Lho <[email protected]>");
 MODULE_DESCRIPTION("SiS 900 PCI Fast Ethernet driver");
 MODULE_LICENSE("GPL");
 
-module_param(multicast_filter_limit, int, 0444);
-module_param(max_interrupt_work, int, 0444);
-module_param(sis900_debug, int, 0444);
+module_param(multicast_filter_limit, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(max_interrupt_work, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(sis900_debug, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(multicast_filter_limit, "SiS 900/7016 maximum number of filtered multicast addresses");
 MODULE_PARM_DESC(max_interrupt_work, "SiS 900/7016 maximum events handled per interrupt");
 MODULE_PARM_DESC(sis900_debug, "SiS 900/7016 bitmapped debugging message level");
Signature · 1 line
2.9.2