* [PATCH 0742/1285] Replace numeric parameter like 0444 with macro
@ 2016-08-02 11:41 Baole Ni
0 siblings, 0 replies; only message in thread
From: Baole Ni @ 2016-08-02 11:41 UTC (permalink / raw)
To: cmetcalf, ecree, bkenward, linux-driver, computersforpeace,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: netdev, linux-kernel, chuansheng.liu, baolex.ni, robert.jarzmik,
mugunthanvnm, felipe.balbi, fw, arnd
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/net/ethernet/tile/tilegx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
index 0a15acc..fe1bfcc 100644
--- a/drivers/net/ethernet/tile/tilegx.c
+++ b/drivers/net/ethernet/tile/tilegx.c
@@ -319,7 +319,7 @@ static bool network_cpus_init(void)
return true;
}
-module_param_named(cpus, network_cpus_string, charp, 0444);
+module_param_named(cpus, network_cpus_string, charp, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(cpus, "cpulist of cores that handle network interrupts");
/* The "tile_net.loopify=LINK" argument causes the named device to
@@ -328,19 +328,19 @@ MODULE_PARM_DESC(cpus, "cpulist of cores that handle network interrupts");
* (some) packets along to linux, and forwarding (some) packets sent
* out by linux.
*/
-module_param_named(loopify, loopify_link_name, charp, 0444);
+module_param_named(loopify, loopify_link_name, charp, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(loopify, "name the device to use loop0/1 for ingress/egress");
/* The "tile_net.custom" argument causes us to ignore the "conventional"
* classifier metadata, in particular, the "l2_offset".
*/
-module_param_named(custom, custom_flag, bool, 0444);
+module_param_named(custom, custom_flag, bool, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(custom, "indicates a (heavily) customized classifier");
/* The "tile_net.jumbo" argument causes us to support "jumbo" packets,
* and to allocate the given number of "jumbo" buffers.
*/
-module_param_named(jumbo, jumbo_num, uint, 0444);
+module_param_named(jumbo, jumbo_num, uint, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(jumbo, "the number of buffers to support jumbo packets");
/* Atomically update a statistics field.
--
2.9.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-02 12:20 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:41 [PATCH 0742/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®