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@xxxxxxxxx> Signed-off-by: Baole Ni <baolex.ni@xxxxxxxxx> --- drivers/staging/octeon/ethernet.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index e9cd5f2..d0841ed 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -40,13 +40,13 @@ #include <asm/octeon/cvmx-smix-defs.h> static int num_packet_buffers = 1024; -module_param(num_packet_buffers, int, 0444); +module_param(num_packet_buffers, int, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(num_packet_buffers, "\n" "\tNumber of packet buffers to allocate and store in the\n" "\tFPA. By default, 1024 packet buffers are used.\n"); int pow_receive_group = 15; -module_param(pow_receive_group, int, 0444); +module_param(pow_receive_group, int, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(pow_receive_group, "\n" "\tPOW group to receive packets from. All ethernet hardware\n" "\twill be configured to send incoming packets to this POW\n" @@ -54,14 +54,14 @@ MODULE_PARM_DESC(pow_receive_group, "\n" "\tgroup for the kernel to process."); int pow_send_group = -1; -module_param(pow_send_group, int, 0644); +module_param(pow_send_group, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(pow_send_group, "\n" "\tPOW group to send packets to other software on. This\n" "\tcontrols the creation of the virtual device pow0.\n" "\talways_use_pow also depends on this value."); int always_use_pow; -module_param(always_use_pow, int, 0444); +module_param(always_use_pow, int, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(always_use_pow, "\n" "\tWhen set, always send to the pow group. This will cause\n" "\tpackets sent to real ethernet devices to be sent to the\n" @@ -73,7 +73,7 @@ MODULE_PARM_DESC(always_use_pow, "\n" "\tthis option."); char pow_send_list[128] = ""; -module_param_string(pow_send_list, pow_send_list, sizeof(pow_send_list), 0444); +module_param_string(pow_send_list, pow_send_list, sizeof(pow_send_list), S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(pow_send_list, "\n" "\tComma separated list of ethernet devices that should use the\n" "\tPOW for transmit instead of the actual ethernet hardware. This\n" @@ -83,7 +83,7 @@ MODULE_PARM_DESC(pow_send_list, "\n" "\tusing the pow_send_group."); int rx_napi_weight = 32; -module_param(rx_napi_weight, int, 0444); +module_param(rx_napi_weight, int, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(rx_napi_weight, "The NAPI WEIGHT parameter."); -- 2.9.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel