[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20160802120214.13574-1-baolex.ni@intel.com>
Date: Tue, 2 Aug 2016 20:02:14 +0800
From: Baole Ni <baolex.ni@...el.com>
To: gregkh@...uxfoundation.org, dsd@...top.org,
jon.nettleton@...il.com, m.chehab@...sung.com,
m.szyprowski@...sung.com, kyungmin.park@...sung.com,
k.kozlowski@...sung.com
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Larry.Finger@...inger.net, florian.c.schilhabel@...glemail.com,
luisbg@....samsung.com, shivanib134@...il.com, punitvara@...il.com,
joseph.bisch@...il.com, bhaktipriya96@...il.com,
chuansheng.liu@...el.com, baolex.ni@...el.com
Subject: [PATCH 0953/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.
Signed-off-by: Chuansheng Liu <chuansheng.liu@...el.com>
Signed-off-by: Baole Ni <baolex.ni@...el.com>
---
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
Powered by blists - more mailing lists