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/rtl8712/os_intfs.c | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index 57211f7..d62009c 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -98,26 +98,26 @@ static char *initmac; static int wifi_test; module_param_string(ifname, ifname, sizeof(ifname), S_IRUGO | S_IWUSR); -module_param(wifi_test, int, 0644); -module_param(initmac, charp, 0644); -module_param(video_mode, int, 0644); -module_param(chip_version, int, 0644); -module_param(rfintfs, int, 0644); -module_param(lbkmode, int, 0644); -module_param(hci, int, 0644); -module_param(network_mode, int, 0644); -module_param(channel, int, 0644); -module_param(mp_mode, int, 0644); -module_param(wmm_enable, int, 0644); -module_param(vrtl_carrier_sense, int, 0644); -module_param(vcs_type, int, 0644); -module_param(busy_thresh, int, 0644); -module_param(ht_enable, int, 0644); -module_param(cbw40_enable, int, 0644); -module_param(ampdu_enable, int, 0644); -module_param(rf_config, int, 0644); -module_param(power_mgnt, int, 0644); -module_param(low_power, int, 0644); +module_param(wifi_test, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(initmac, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(video_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(chip_version, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(rfintfs, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(lbkmode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(hci, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(network_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(channel, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(mp_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(wmm_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(vrtl_carrier_sense, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(vcs_type, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(busy_thresh, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(ht_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(cbw40_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(ampdu_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(rf_config, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(power_mgnt, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param(low_power, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(ifname, " Net interface name, wlan%d=default"); MODULE_PARM_DESC(initmac, "MAC-Address, default: use FUSE"); -- 2.9.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel