Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 0784/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: johannes, kvalo, luciano.coelho, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni,
	a, fw, Jes.Sorensen

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/wireless/mac80211_hwsim.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 4dd5adc..ad82480 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -42,23 +42,23 @@ MODULE_LICENSE("GPL");
 static u32 wmediumd_portid;
 
 static int radios = 2;
-module_param(radios, int, 0444);
+module_param(radios, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(radios, "Number of simulated radios");
 
 static int channels = 1;
-module_param(channels, int, 0444);
+module_param(channels, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(channels, "Number of concurrent channels");
 
 static bool paged_rx = false;
-module_param(paged_rx, bool, 0644);
+module_param(paged_rx, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(paged_rx, "Use paged SKBs for RX instead of linear ones");
 
 static bool rctbl = false;
-module_param(rctbl, bool, 0444);
+module_param(rctbl, bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rctbl, "Handle rate control table");
 
 static bool support_p2p_device = true;
-module_param(support_p2p_device, bool, 0444);
+module_param(support_p2p_device, bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(support_p2p_device, "Support P2P-Device interface type");
 
 /**
@@ -134,7 +134,7 @@ enum hwsim_regtest {
 
 /* Set to one of the HWSIM_REGTEST_* values above */
 static int regtest = HWSIM_REGTEST_DISABLED;
-module_param(regtest, int, 0444);
+module_param(regtest, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(regtest, "The type of regulatory test we want to run");
 
 static const char *hwsim_alpha2s[] = {
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0791/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: akarwar, nishants, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/marvell/mwifiex/wmm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/wmm.c b/drivers/net/wireless/marvell/mwifiex/wmm.c
index 0eb2465..2b1412b 100644
--- a/drivers/net/wireless/marvell/mwifiex/wmm.c
+++ b/drivers/net/wireless/marvell/mwifiex/wmm.c
@@ -38,7 +38,7 @@
 #define IPTOS_OFFSET 5
 
 static bool disable_tx_amsdu;
-module_param(disable_tx_amsdu, bool, 0644);
+module_param(disable_tx_amsdu, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 /* WMM information IE */
 static const u8 wmm_info_ie[] = { WLAN_EID_VENDOR_SPECIFIC, 0x07,
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0792/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: Jes.Sorensen, kvalo, linuxwifi, m.chehab, pawel, m.szyprowski,
	kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 9f6dbb4..8800df2 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -58,9 +58,9 @@ MODULE_FIRMWARE("rtlwifi/rtl8192eu_nic.bin");
 MODULE_FIRMWARE("rtlwifi/rtl8723bu_nic.bin");
 MODULE_FIRMWARE("rtlwifi/rtl8723bu_bt.bin");
 
-module_param_named(debug, rtl8xxxu_debug, int, 0600);
+module_param_named(debug, rtl8xxxu_debug, int, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(debug, "Set debug mask");
-module_param_named(ht40_2g, rtl8xxxu_ht40_2g, bool, 0600);
+module_param_named(ht40_2g, rtl8xxxu_ht40_2g, bool, S_IRUSR | S_IWUSR);
 MODULE_PARM_DESC(ht40_2g, "Enable HT40 support on the 2.4GHz band");
 
 #define USB_VENDOR_ID_REALTEK		0x0bda
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0785/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: kvalo, luciano.coelho, linuxwifi, m.chehab, pawel, m.szyprowski,
	kyungmin.park, k.kozlowski
  Cc: libertas-dev, linux-wireless, netdev, linux-kernel, dan.carpenter,
	andreas, chuansheng.liu, baolex.ni

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/wireless/marvell/libertas/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/marvell/libertas/main.c b/drivers/net/wireless/marvell/libertas/main.c
index 8541cbe..b4fa7bd 100644
--- a/drivers/net/wireless/marvell/libertas/main.c
+++ b/drivers/net/wireless/marvell/libertas/main.c
@@ -36,11 +36,11 @@ const char lbs_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
 /* Module parameters */
 unsigned int lbs_debug;
 EXPORT_SYMBOL_GPL(lbs_debug);
-module_param_named(libertas_debug, lbs_debug, int, 0644);
+module_param_named(libertas_debug, lbs_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 unsigned int lbs_disablemesh;
 EXPORT_SYMBOL_GPL(lbs_disablemesh);
-module_param_named(libertas_disablemesh, lbs_disablemesh, int, 0644);
+module_param_named(libertas_disablemesh, lbs_disablemesh, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 
 /*
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0794/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:47 UTC (permalink / raw)
  To: Larry.Finger, chaoming_li, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
index 4780bdc..6e01159 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c
@@ -372,11 +372,11 @@ MODULE_FIRMWARE("rtlwifi/rtl8192cfw.bin");
 MODULE_FIRMWARE("rtlwifi/rtl8192cfwU.bin");
 MODULE_FIRMWARE("rtlwifi/rtl8192cfwU_B.bin");
 
-module_param_named(swenc, rtl92ce_mod_params.sw_crypto, bool, 0444);
-module_param_named(debug, rtl92ce_mod_params.debug, int, 0444);
-module_param_named(ips, rtl92ce_mod_params.inactiveps, bool, 0444);
-module_param_named(swlps, rtl92ce_mod_params.swctrl_lps, bool, 0444);
-module_param_named(fwlps, rtl92ce_mod_params.fwctrl_lps, bool, 0444);
+module_param_named(swenc, rtl92ce_mod_params.sw_crypto, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(debug, rtl92ce_mod_params.debug, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(ips, rtl92ce_mod_params.inactiveps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(swlps, rtl92ce_mod_params.swctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(fwlps, rtl92ce_mod_params.fwctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
 MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
 MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0790/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: akarwar, nishants, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/marvell/mwifiex/sta_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
index 8e08626..efeeee3 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
@@ -27,7 +27,7 @@
 #include "cfg80211.h"
 
 static int disconnect_on_suspend;
-module_param(disconnect_on_suspend, int, 0644);
+module_param(disconnect_on_suspend, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 /*
  * Copies the multicast address list from device to driver.
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0793/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: Larry.Finger, chaoming_li, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c
index 47e32cb..91ae5a2 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c
@@ -393,14 +393,14 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek 8188E 802.11n PCI wireless");
 MODULE_FIRMWARE("rtlwifi/rtl8188efw.bin");
 
-module_param_named(swenc, rtl88ee_mod_params.sw_crypto, bool, 0444);
-module_param_named(debug, rtl88ee_mod_params.debug, int, 0444);
-module_param_named(ips, rtl88ee_mod_params.inactiveps, bool, 0444);
-module_param_named(swlps, rtl88ee_mod_params.swctrl_lps, bool, 0444);
-module_param_named(fwlps, rtl88ee_mod_params.fwctrl_lps, bool, 0444);
-module_param_named(msi, rtl88ee_mod_params.msi_support, bool, 0444);
+module_param_named(swenc, rtl88ee_mod_params.sw_crypto, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(debug, rtl88ee_mod_params.debug, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(ips, rtl88ee_mod_params.inactiveps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(swlps, rtl88ee_mod_params.swctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(fwlps, rtl88ee_mod_params.fwctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(msi, rtl88ee_mod_params.msi_support, bool, S_IRUSR | S_IRGRP | S_IROTH);
 module_param_named(disable_watchdog, rtl88ee_mod_params.disable_watchdog,
-		   bool, 0444);
+		   bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
 MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
 MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0787/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: kvalo, luciano.coelho, linuxwifi, m.chehab, pawel, m.szyprowski,
	kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/marvell/libertas_tf/if_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas_tf/if_usb.c b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
index 799a2ef..4504f2c 100644
--- a/drivers/net/wireless/marvell/libertas_tf/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
@@ -27,7 +27,7 @@
 #define MESSAGE_HEADER_LEN	4
 
 static char *lbtf_fw_name = "lbtf_usb.bin";
-module_param_named(fw_name, lbtf_fw_name, charp, 0644);
+module_param_named(fw_name, lbtf_fw_name, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 MODULE_FIRMWARE("lbtf_usb.bin");
 
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0789/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: akarwar, nishants, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/marvell/mwifiex/sta_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
index e436574..b2f3cda 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
@@ -27,7 +27,7 @@
 #include "11ac.h"
 
 static bool drcs;
-module_param(drcs, bool, 0644);
+module_param(drcs, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(drcs, "multi-channel operation:1, single-channel operation:0");
 
 static bool disable_auto_ds;
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0788/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: kvalo, luciano.coelho, linuxwifi, m.chehab, pawel, m.szyprowski,
	kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, johannes.berg,
	chuansheng.liu, baolex.ni

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/wireless/marvell/libertas_tf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas_tf/main.c b/drivers/net/wireless/marvell/libertas_tf/main.c
index 0bf8916..d0a1abb 100644
--- a/drivers/net/wireless/marvell/libertas_tf/main.c
+++ b/drivers/net/wireless/marvell/libertas_tf/main.c
@@ -25,7 +25,7 @@
 /* Module parameters */
 unsigned int lbtf_debug;
 EXPORT_SYMBOL_GPL(lbtf_debug);
-module_param_named(libertas_tf_debug, lbtf_debug, int, 0644);
+module_param_named(libertas_tf_debug, lbtf_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 static const char lbtf_driver_version[] = "THINFIRM-USB8388-" DRIVER_RELEASE_VERSION
 #ifdef DEBUG
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0786/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:46 UTC (permalink / raw)
  To: kvalo, luciano.coelho, linuxwifi, m.chehab, pawel, m.szyprowski,
	kyungmin.park, k.kozlowski
  Cc: libertas-dev, linux-wireless, netdev, linux-kernel,
	chuansheng.liu, baolex.ni

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/wireless/marvell/libertas/mesh.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/marvell/libertas/mesh.c b/drivers/net/wireless/marvell/libertas/mesh.c
index d0c881d..ae4f0a5 100644
--- a/drivers/net/wireless/marvell/libertas/mesh.c
+++ b/drivers/net/wireless/marvell/libertas/mesh.c
@@ -297,19 +297,19 @@ static ssize_t lbs_mesh_set(struct device *dev,
  * lbs_mesh attribute to be exported per ethX interface
  * through sysfs (/sys/class/net/ethX/lbs_mesh)
  */
-static DEVICE_ATTR(lbs_mesh, 0644, lbs_mesh_get, lbs_mesh_set);
+static DEVICE_ATTR(lbs_mesh, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, lbs_mesh_get, lbs_mesh_set);
 
 /*
  * anycast_mask attribute to be exported per mshX interface
  * through sysfs (/sys/class/net/mshX/anycast_mask)
  */
-static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set);
+static DEVICE_ATTR(anycast_mask, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, lbs_anycast_get, lbs_anycast_set);
 
 /*
  * prb_rsp_limit attribute to be exported per mshX interface
  * through sysfs (/sys/class/net/mshX/prb_rsp_limit)
  */
-static DEVICE_ATTR(prb_rsp_limit, 0644, lbs_prb_rsp_limit_get,
+static DEVICE_ATTR(prb_rsp_limit, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, lbs_prb_rsp_limit_get,
 		lbs_prb_rsp_limit_set);
 
 static struct attribute *lbs_mesh_sysfs_entries[] = {
@@ -764,13 +764,13 @@ static ssize_t capability_set(struct device *dev, struct device_attribute *attr,
 }
 
 
-static DEVICE_ATTR(bootflag, 0644, bootflag_get, bootflag_set);
-static DEVICE_ATTR(boottime, 0644, boottime_get, boottime_set);
-static DEVICE_ATTR(channel, 0644, channel_get, channel_set);
-static DEVICE_ATTR(mesh_id, 0644, mesh_id_get, mesh_id_set);
-static DEVICE_ATTR(protocol_id, 0644, protocol_id_get, protocol_id_set);
-static DEVICE_ATTR(metric_id, 0644, metric_id_get, metric_id_set);
-static DEVICE_ATTR(capability, 0644, capability_get, capability_set);
+static DEVICE_ATTR(bootflag, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, bootflag_get, bootflag_set);
+static DEVICE_ATTR(boottime, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, boottime_get, boottime_set);
+static DEVICE_ATTR(channel, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, channel_get, channel_set);
+static DEVICE_ATTR(mesh_id, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, mesh_id_get, mesh_id_set);
+static DEVICE_ATTR(protocol_id, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, protocol_id_get, protocol_id_set);
+static DEVICE_ATTR(metric_id, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, metric_id_get, metric_id_set);
+static DEVICE_ATTR(capability, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, capability_get, capability_set);
 
 static struct attribute *boot_opts_attrs[] = {
 	&dev_attr_bootflag.attr,
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0801/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:47 UTC (permalink / raw)
  To: Larry.Finger, chaoming_li, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
index 4159f9b..fec4969 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
@@ -433,15 +433,15 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek 8821ae 802.11ac PCI wireless");
 MODULE_FIRMWARE("rtlwifi/rtl8821aefw.bin");
 
-module_param_named(swenc, rtl8821ae_mod_params.sw_crypto, bool, 0444);
-module_param_named(debug, rtl8821ae_mod_params.debug, int, 0444);
-module_param_named(ips, rtl8821ae_mod_params.inactiveps, bool, 0444);
-module_param_named(swlps, rtl8821ae_mod_params.swctrl_lps, bool, 0444);
-module_param_named(fwlps, rtl8821ae_mod_params.fwctrl_lps, bool, 0444);
-module_param_named(msi, rtl8821ae_mod_params.msi_support, bool, 0444);
+module_param_named(swenc, rtl8821ae_mod_params.sw_crypto, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(debug, rtl8821ae_mod_params.debug, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(ips, rtl8821ae_mod_params.inactiveps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(swlps, rtl8821ae_mod_params.swctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(fwlps, rtl8821ae_mod_params.fwctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(msi, rtl8821ae_mod_params.msi_support, bool, S_IRUSR | S_IRGRP | S_IROTH);
 module_param_named(disable_watchdog, rtl8821ae_mod_params.disable_watchdog,
-		   bool, 0444);
-module_param_named(int_clear, rtl8821ae_mod_params.int_clear, bool, 0444);
+		   bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(int_clear, rtl8821ae_mod_params.int_clear, bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
 MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
 MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0804/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:48 UTC (permalink / raw)
  To: pizza, kvalo, linuxwifi, m.chehab, pawel, m.szyprowski,
	kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/st/cw1200/sta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/st/cw1200/sta.c b/drivers/net/wireless/st/cw1200/sta.c
index daf06a4..fad0c81 100644
--- a/drivers/net/wireless/st/cw1200/sta.c
+++ b/drivers/net/wireless/st/cw1200/sta.c
@@ -144,7 +144,7 @@ void cw1200_stop(struct ieee80211_hw *dev)
 }
 
 static int cw1200_bssloss_mitigation = 1;
-module_param(cw1200_bssloss_mitigation, int, 0644);
+module_param(cw1200_bssloss_mitigation, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(cw1200_bssloss_mitigation, "BSS Loss mitigation. 0 == disabled, 1 == enabled (default)");
 
 
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0800/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:47 UTC (permalink / raw)
  To: Larry.Finger, chaoming_li, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/realtek/rtlwifi/rtl8723be/sw.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
index 2101793..530b692 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
@@ -387,15 +387,15 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek 8723BE 802.11n PCI wireless");
 MODULE_FIRMWARE("rtlwifi/rtl8723befw.bin");
 
-module_param_named(swenc, rtl8723be_mod_params.sw_crypto, bool, 0444);
-module_param_named(debug, rtl8723be_mod_params.debug, int, 0444);
-module_param_named(ips, rtl8723be_mod_params.inactiveps, bool, 0444);
-module_param_named(swlps, rtl8723be_mod_params.swctrl_lps, bool, 0444);
-module_param_named(fwlps, rtl8723be_mod_params.fwctrl_lps, bool, 0444);
-module_param_named(msi, rtl8723be_mod_params.msi_support, bool, 0444);
+module_param_named(swenc, rtl8723be_mod_params.sw_crypto, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(debug, rtl8723be_mod_params.debug, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(ips, rtl8723be_mod_params.inactiveps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(swlps, rtl8723be_mod_params.swctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(fwlps, rtl8723be_mod_params.fwctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(msi, rtl8723be_mod_params.msi_support, bool, S_IRUSR | S_IRGRP | S_IROTH);
 module_param_named(disable_watchdog, rtl8723be_mod_params.disable_watchdog,
-		   bool, 0444);
-module_param_named(ant_sel, rtl8723be_mod_params.ant_sel, int, 0444);
+		   bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(ant_sel, rtl8723be_mod_params.ant_sel, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
 MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
 MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0780/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
  To: j, kvalo, luciano.coelho, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni,
	lars, johannes.berg

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/wireless/intersil/hostap/hostap_hw.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/intersil/hostap/hostap_hw.c b/drivers/net/wireless/intersil/hostap/hostap_hw.c
index a8a9bd8..9d7230e 100644
--- a/drivers/net/wireless/intersil/hostap/hostap_hw.c
+++ b/drivers/net/wireless/intersil/hostap/hostap_hw.c
@@ -58,31 +58,31 @@
 /* #define final_version */
 
 static int mtu = 1500;
-module_param(mtu, int, 0444);
+module_param(mtu, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(mtu, "Maximum transfer unit");
 
 static int channel[MAX_PARM_DEVICES] = { 3, DEF_INTS };
-module_param_array(channel, int, NULL, 0444);
+module_param_array(channel, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(channel, "Initial channel");
 
 static char essid[33] = "test";
-module_param_string(essid, essid, sizeof(essid), 0444);
+module_param_string(essid, essid, sizeof(essid), S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(essid, "Host AP's ESSID");
 
 static int iw_mode[MAX_PARM_DEVICES] = { IW_MODE_MASTER, DEF_INTS };
-module_param_array(iw_mode, int, NULL, 0444);
+module_param_array(iw_mode, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(iw_mode, "Initial operation mode");
 
 static int beacon_int[MAX_PARM_DEVICES] = { 100, DEF_INTS };
-module_param_array(beacon_int, int, NULL, 0444);
+module_param_array(beacon_int, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(beacon_int, "Beacon interval (1 = 1024 usec)");
 
 static int dtim_period[MAX_PARM_DEVICES] = { 1, DEF_INTS };
-module_param_array(dtim_period, int, NULL, 0444);
+module_param_array(dtim_period, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(dtim_period, "DTIM period");
 
 static char dev_template[16] = "wlan%d";
-module_param_string(dev_template, dev_template, sizeof(dev_template), 0444);
+module_param_string(dev_template, dev_template, sizeof(dev_template), S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(dev_template, "Prefix for network device name (default: "
 		 "wlan%d)");
 
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0779/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
  To: j, kvalo, luciano.coelho, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni,
	lars, johannes.berg

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/wireless/intersil/hostap/hostap_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intersil/hostap/hostap_cs.c b/drivers/net/wireless/intersil/hostap/hostap_cs.c
index 74f63b7..5329e11 100644
--- a/drivers/net/wireless/intersil/hostap/hostap_cs.c
+++ b/drivers/net/wireless/intersil/hostap/hostap_cs.c
@@ -30,7 +30,7 @@ MODULE_LICENSE("GPL");
 
 
 static int ignore_cis_vcc;
-module_param(ignore_cis_vcc, int, 0444);
+module_param(ignore_cis_vcc, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ignore_cis_vcc, "Ignore broken CIS VCC entry");
 
 
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0802/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:47 UTC (permalink / raw)
  To: jussi.kivilinna, kvalo, linuxwifi, m.chehab, pawel, m.szyprowski,
	kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/rndis_wlan.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 569918c..f6317d7 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -46,43 +46,43 @@
 
 /* NOTE: All these are settings for Broadcom chipset */
 static char modparam_country[4] = "EU";
-module_param_string(country, modparam_country, 4, 0444);
+module_param_string(country, modparam_country, 4, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(country, "Country code (ISO 3166-1 alpha-2), default: EU");
 
 static int modparam_frameburst = 1;
-module_param_named(frameburst, modparam_frameburst, int, 0444);
+module_param_named(frameburst, modparam_frameburst, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(frameburst, "enable frame bursting (default: on)");
 
 static int modparam_afterburner = 0;
-module_param_named(afterburner, modparam_afterburner, int, 0444);
+module_param_named(afterburner, modparam_afterburner, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(afterburner,
 	"enable afterburner aka '125 High Speed Mode' (default: off)");
 
 static int modparam_power_save = 0;
-module_param_named(power_save, modparam_power_save, int, 0444);
+module_param_named(power_save, modparam_power_save, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(power_save,
 	"set power save mode: 0=off, 1=on, 2=fast (default: off)");
 
 static int modparam_power_output = 3;
-module_param_named(power_output, modparam_power_output, int, 0444);
+module_param_named(power_output, modparam_power_output, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(power_output,
 	"set power output: 0=25%, 1=50%, 2=75%, 3=100% (default: 100%)");
 
 static int modparam_roamtrigger = -70;
-module_param_named(roamtrigger, modparam_roamtrigger, int, 0444);
+module_param_named(roamtrigger, modparam_roamtrigger, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(roamtrigger,
 	"set roaming dBm trigger: -80=optimize for distance, "
 				"-60=bandwidth (default: -70)");
 
 static int modparam_roamdelta = 1;
-module_param_named(roamdelta, modparam_roamdelta, int, 0444);
+module_param_named(roamdelta, modparam_roamdelta, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(roamdelta,
 	"set roaming tendency: 0=aggressive, 1=moderate, "
 				"2=conservative (default: moderate)");
 
 static int modparam_workaround_interval;
 module_param_named(workaround_interval, modparam_workaround_interval,
-							int, 0444);
+							int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(workaround_interval,
 	"set stall workaround interval in msecs (0=disabled) (default: 0)");
 
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0782/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
  To: kvalo, luciano.coelho, linuxwifi, m.chehab, pawel, m.szyprowski,
	kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, mugunthanvnm, felipe.balbi,
	a, fw, Jes.Sorensen, chuansheng.liu, baolex.ni

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/wireless/intersil/orinoco/main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intersil/orinoco/main.c b/drivers/net/wireless/intersil/orinoco/main.c
index 7afe200..763fd1d 100644
--- a/drivers/net/wireless/intersil/orinoco/main.c
+++ b/drivers/net/wireless/intersil/orinoco/main.c
@@ -117,21 +117,21 @@ MODULE_LICENSE("Dual MPL/GPL");
 #ifdef ORINOCO_DEBUG
 int orinoco_debug = ORINOCO_DEBUG;
 EXPORT_SYMBOL(orinoco_debug);
-module_param(orinoco_debug, int, 0644);
+module_param(orinoco_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(orinoco_debug, "Debug level");
 #endif
 
 static bool suppress_linkstatus; /* = 0 */
-module_param(suppress_linkstatus, bool, 0644);
+module_param(suppress_linkstatus, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(suppress_linkstatus, "Don't log link status changes");
 
 static int ignore_disconnect; /* = 0 */
-module_param(ignore_disconnect, int, 0644);
+module_param(ignore_disconnect, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ignore_disconnect,
 		 "Don't report lost link to the network layer");
 
 int force_monitor; /* = 0 */
-module_param(force_monitor, int, 0644);
+module_param(force_monitor, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(force_monitor, "Allow monitor mode for all firmware versions");
 
 /********************************************************************/
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0803/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:48 UTC (permalink / raw)
  To: pizza, kvalo, linuxwifi, m.chehab, pawel, m.szyprowski,
	kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/st/cw1200/main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/st/cw1200/main.c b/drivers/net/wireless/st/cw1200/main.c
index dc478ce..c664c21 100644
--- a/drivers/net/wireless/st/cw1200/main.c
+++ b/drivers/net/wireless/st/cw1200/main.c
@@ -50,14 +50,14 @@ module_param_array_named(macaddr, cw1200_mac_template, byte, NULL, S_IRUGO);
 MODULE_PARM_DESC(macaddr, "Override platform_data MAC address");
 
 static char *cw1200_sdd_path;
-module_param(cw1200_sdd_path, charp, 0644);
+module_param(cw1200_sdd_path, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(cw1200_sdd_path, "Override platform_data SDD file");
 static int cw1200_refclk;
-module_param(cw1200_refclk, int, 0644);
+module_param(cw1200_refclk, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(cw1200_refclk, "Override platform_data reference clock");
 
 int cw1200_power_mode = wsm_power_mode_quiescent;
-module_param(cw1200_power_mode, int, 0644);
+module_param(cw1200_power_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(cw1200_power_mode, "WSM power mode.  0 == active, 1 == doze, 2 == quiescent (default)");
 
 #define RATETAB_ENT(_rate, _rateid, _flags)		\
@@ -239,8 +239,8 @@ static const struct ieee80211_ops cw1200_ops = {
 
 static int cw1200_ba_rx_tids = -1;
 static int cw1200_ba_tx_tids = -1;
-module_param(cw1200_ba_rx_tids, int, 0644);
-module_param(cw1200_ba_tx_tids, int, 0644);
+module_param(cw1200_ba_rx_tids, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(cw1200_ba_tx_tids, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(cw1200_ba_rx_tids, "Block ACK RX TIDs");
 MODULE_PARM_DESC(cw1200_ba_tx_tids, "Block ACK TX TIDs");
 
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0781/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
  To: j, kvalo, luciano.coelho, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni,
	lars, johannes.berg

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/wireless/intersil/hostap/hostap_plx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intersil/hostap/hostap_plx.c b/drivers/net/wireless/intersil/hostap/hostap_plx.c
index 4901a99..cbdd2c7 100644
--- a/drivers/net/wireless/intersil/hostap/hostap_plx.c
+++ b/drivers/net/wireless/intersil/hostap/hostap_plx.c
@@ -34,7 +34,7 @@ MODULE_LICENSE("GPL");
 
 
 static int ignore_cis;
-module_param(ignore_cis, int, 0444);
+module_param(ignore_cis, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ignore_cis, "Do not verify manfid information in CIS");
 
 
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0783/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
  To: chunkeey, kvalo, luciano.coelho, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni,
	a, fw, Jes.Sorensen

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/wireless/intersil/p54/p54spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intersil/p54/p54spi.c b/drivers/net/wireless/intersil/p54/p54spi.c
index 7ab2f43..07c77f8 100644
--- a/drivers/net/wireless/intersil/p54/p54spi.c
+++ b/drivers/net/wireless/intersil/p54/p54spi.c
@@ -48,11 +48,11 @@ MODULE_FIRMWARE("3826.arm");
  */
 
 static int p54spi_gpio_power = 97;
-module_param(p54spi_gpio_power, int, 0444);
+module_param(p54spi_gpio_power, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(p54spi_gpio_power, "gpio number for power line");
 
 static int p54spi_gpio_irq = 87;
-module_param(p54spi_gpio_irq, int, 0444);
+module_param(p54spi_gpio_irq, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(p54spi_gpio_irq, "gpio number for irq line");
 
 static void p54spi_spi_read(struct p54s_priv *priv, u8 address,
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0795/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:47 UTC (permalink / raw)
  To: Larry.Finger, chaoming_li, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, adrien+dev, chuansheng.liu,
	baolex.ni

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/wireless/realtek/rtlwifi/rtl8192cu/sw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c
index 7c6f7f0..d704e18 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c
@@ -164,8 +164,8 @@ static struct rtl_mod_params rtl92cu_mod_params = {
 	.debug = DBG_EMERG,
 };
 
-module_param_named(swenc, rtl92cu_mod_params.sw_crypto, bool, 0444);
-module_param_named(debug, rtl92cu_mod_params.debug, int, 0444);
+module_param_named(swenc, rtl92cu_mod_params.sw_crypto, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(debug, rtl92cu_mod_params.debug, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
 MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)");
 
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0799/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:47 UTC (permalink / raw)
  To: Larry.Finger, chaoming_li, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
index ff49a8c..8d7f581 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
@@ -385,14 +385,14 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek 8723E 802.11n PCI wireless");
 MODULE_FIRMWARE("rtlwifi/rtl8723efw.bin");
 
-module_param_named(swenc, rtl8723e_mod_params.sw_crypto, bool, 0444);
-module_param_named(debug, rtl8723e_mod_params.debug, int, 0444);
-module_param_named(ips, rtl8723e_mod_params.inactiveps, bool, 0444);
-module_param_named(swlps, rtl8723e_mod_params.swctrl_lps, bool, 0444);
-module_param_named(fwlps, rtl8723e_mod_params.fwctrl_lps, bool, 0444);
-module_param_named(msi, rtl8723e_mod_params.msi_support, bool, 0444);
+module_param_named(swenc, rtl8723e_mod_params.sw_crypto, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(debug, rtl8723e_mod_params.debug, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(ips, rtl8723e_mod_params.inactiveps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(swlps, rtl8723e_mod_params.swctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(fwlps, rtl8723e_mod_params.fwctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(msi, rtl8723e_mod_params.msi_support, bool, S_IRUSR | S_IRGRP | S_IROTH);
 module_param_named(disable_watchdog, rtl8723e_mod_params.disable_watchdog,
-		   bool, 0444);
+		   bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
 MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
 MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0797/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:47 UTC (permalink / raw)
  To: Larry.Finger, chaoming_li, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c
index c31c6bf..581af83 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c
@@ -369,14 +369,14 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek 8192EE 802.11n PCI wireless");
 MODULE_FIRMWARE("rtlwifi/rtl8192eefw.bin");
 
-module_param_named(swenc, rtl92ee_mod_params.sw_crypto, bool, 0444);
-module_param_named(debug, rtl92ee_mod_params.debug, int, 0444);
-module_param_named(ips, rtl92ee_mod_params.inactiveps, bool, 0444);
-module_param_named(swlps, rtl92ee_mod_params.swctrl_lps, bool, 0444);
-module_param_named(fwlps, rtl92ee_mod_params.fwctrl_lps, bool, 0444);
-module_param_named(msi, rtl92ee_mod_params.msi_support, bool, 0444);
+module_param_named(swenc, rtl92ee_mod_params.sw_crypto, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(debug, rtl92ee_mod_params.debug, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(ips, rtl92ee_mod_params.inactiveps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(swlps, rtl92ee_mod_params.swctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(fwlps, rtl92ee_mod_params.fwctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(msi, rtl92ee_mod_params.msi_support, bool, S_IRUSR | S_IRGRP | S_IROTH);
 module_param_named(disable_watchdog, rtl92ee_mod_params.disable_watchdog,
-		   bool, 0444);
+		   bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
 MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
 MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
-- 
2.9.2


^ permalink raw reply related

* [PATCH 0798/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:47 UTC (permalink / raw)
  To: Larry.Finger, chaoming_li, kvalo, linuxwifi, m.chehab, pawel,
	m.szyprowski, kyungmin.park, k.kozlowski
  Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni

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/wireless/realtek/rtlwifi/rtl8192se/sw.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
index 31baca41..d543a78 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
@@ -420,11 +420,11 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek 8192S/8191S 802.11n PCI wireless");
 MODULE_FIRMWARE("rtlwifi/rtl8192sefw.bin");
 
-module_param_named(swenc, rtl92se_mod_params.sw_crypto, bool, 0444);
-module_param_named(debug, rtl92se_mod_params.debug, int, 0444);
-module_param_named(ips, rtl92se_mod_params.inactiveps, bool, 0444);
-module_param_named(swlps, rtl92se_mod_params.swctrl_lps, bool, 0444);
-module_param_named(fwlps, rtl92se_mod_params.fwctrl_lps, bool, 0444);
+module_param_named(swenc, rtl92se_mod_params.sw_crypto, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(debug, rtl92se_mod_params.debug, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(ips, rtl92se_mod_params.inactiveps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(swlps, rtl92se_mod_params.swctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(fwlps, rtl92se_mod_params.fwctrl_lps, bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
 MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
 MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 1)\n");
-- 
2.9.2


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox