DORMANTno replies

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

From: Baole Ni <hidden>
Date: 2016-08-02 15:54:20
Also in: lkml
Subsystem: cyclades pc300 driver, generic hdlc (wan) drivers, networking drivers, the rest · Maintainers: Krzysztof Halasa, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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 <redacted>
Signed-off-by: Baole Ni <redacted>
---
 drivers/net/wan/pc300too.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wan/pc300too.c b/drivers/net/wan/pc300too.c
index db36385..0356e99 100644
--- a/drivers/net/wan/pc300too.c
+++ b/drivers/net/wan/pc300too.c
@@ -525,9 +525,9 @@ MODULE_AUTHOR("Krzysztof Halasa <khc@pm.waw.pl>");
 MODULE_DESCRIPTION("Cyclades PC300 serial port driver");
 MODULE_LICENSE("GPL v2");
 MODULE_DEVICE_TABLE(pci, pc300_pci_tbl);
-module_param(pci_clock_freq, int, 0444);
+module_param(pci_clock_freq, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(pci_clock_freq, "System PCI clock frequency in Hz");
-module_param(use_crystal_clock, int, 0444);
+module_param(use_crystal_clock, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(use_crystal_clock,
 		 "Use 24.576 MHz clock instead of PCI clock");
 module_init(pc300_init_module);
-- 
2.9.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help