* [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 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 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 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 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 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 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 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 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 0778/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_ap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/intersil/hostap/hostap_ap.c b/drivers/net/wireless/intersil/hostap/hostap_ap.c
index c995ace..c0c9f13 100644
--- a/drivers/net/wireless/intersil/hostap/hostap_ap.c
+++ b/drivers/net/wireless/intersil/hostap/hostap_ap.c
@@ -32,22 +32,22 @@
static int other_ap_policy[MAX_PARM_DEVICES] = { AP_OTHER_AP_SKIP_ALL,
DEF_INTS };
-module_param_array(other_ap_policy, int, NULL, 0444);
+module_param_array(other_ap_policy, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(other_ap_policy, "Other AP beacon monitoring policy (0-3)");
static int ap_max_inactivity[MAX_PARM_DEVICES] = { AP_MAX_INACTIVITY_SEC,
DEF_INTS };
-module_param_array(ap_max_inactivity, int, NULL, 0444);
+module_param_array(ap_max_inactivity, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(ap_max_inactivity, "AP timeout (in seconds) for station "
"inactivity");
static int ap_bridge_packets[MAX_PARM_DEVICES] = { 1, DEF_INTS };
-module_param_array(ap_bridge_packets, int, NULL, 0444);
+module_param_array(ap_bridge_packets, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(ap_bridge_packets, "Bridge packets directly between "
"stations");
static int autom_ap_wds[MAX_PARM_DEVICES] = { 0, DEF_INTS };
-module_param_array(autom_ap_wds, int, NULL, 0444);
+module_param_array(autom_ap_wds, int, NULL, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(autom_ap_wds, "Add WDS connections to other APs "
"automatically");
--
2.9.2
^ permalink raw reply related
* [PATCH 0777/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
To: johannes.berg, emmanuel.grumbach, luciano.coelho, linuxwifi,
kvalo, m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni,
lars
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/intel/iwlwifi/dvm/power.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/power.c b/drivers/net/wireless/intel/iwlwifi/dvm/power.c
index 0ad557c..69f6bbd 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/power.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/power.c
@@ -41,7 +41,7 @@
#include "power.h"
static bool force_cam = true;
-module_param(force_cam, bool, 0644);
+module_param(force_cam, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(force_cam, "force continuously aware mode (no power saving at all)");
/*
--
2.9.2
^ permalink raw reply related
* [PATCH 0776/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
To: stas.yakovlev, kvalo, bkenward, linux-driver, computersforpeace,
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/intel/ipw2x00/libipw_module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_module.c b/drivers/net/wireless/intel/ipw2x00/libipw_module.c
index 60f2874..b8435fe 100644
--- a/drivers/net/wireless/intel/ipw2x00/libipw_module.c
+++ b/drivers/net/wireless/intel/ipw2x00/libipw_module.c
@@ -313,7 +313,7 @@ static void __exit libipw_exit(void)
#ifdef CONFIG_LIBIPW_DEBUG
#include <linux/moduleparam.h>
-module_param(debug, int, 0444);
+module_param(debug, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(debug, "debug output mask");
#endif /* CONFIG_LIBIPW_DEBUG */
--
2.9.2
^ permalink raw reply related
* [PATCH 0775/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
To: stas.yakovlev, kvalo, bkenward, linux-driver, computersforpeace,
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/intel/ipw2x00/ipw2200.c | 38 ++++++++++++++--------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index 5adb7ce..f02759e 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -11993,68 +11993,68 @@ static void __exit ipw_exit(void)
pci_unregister_driver(&ipw_driver);
}
-module_param(disable, int, 0444);
+module_param(disable, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])");
-module_param(associate, int, 0444);
+module_param(associate, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(associate, "auto associate when scanning (default off)");
-module_param(auto_create, int, 0444);
+module_param(auto_create, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(auto_create, "auto create adhoc network (default on)");
-module_param_named(led, led_support, int, 0444);
+module_param_named(led, led_support, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(led, "enable led control on some systems (default 1 on)");
-module_param(debug, int, 0444);
+module_param(debug, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(debug, "debug output mask");
-module_param_named(channel, default_channel, int, 0444);
+module_param_named(channel, default_channel, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(channel, "channel to limit associate to (default 0 [ANY])");
#ifdef CONFIG_IPW2200_PROMISCUOUS
-module_param(rtap_iface, int, 0444);
+module_param(rtap_iface, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(rtap_iface, "create the rtap interface (1 - create, default 0)");
#endif
#ifdef CONFIG_IPW2200_QOS
-module_param(qos_enable, int, 0444);
+module_param(qos_enable, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(qos_enable, "enable all QoS functionalitis");
-module_param(qos_burst_enable, int, 0444);
+module_param(qos_burst_enable, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(qos_burst_enable, "enable QoS burst mode");
-module_param(qos_no_ack_mask, int, 0444);
+module_param(qos_no_ack_mask, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(qos_no_ack_mask, "mask Tx_Queue to no ack");
-module_param(burst_duration_CCK, int, 0444);
+module_param(burst_duration_CCK, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(burst_duration_CCK, "set CCK burst value");
-module_param(burst_duration_OFDM, int, 0444);
+module_param(burst_duration_OFDM, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(burst_duration_OFDM, "set OFDM burst value");
#endif /* CONFIG_IPW2200_QOS */
#ifdef CONFIG_IPW2200_MONITOR
-module_param_named(mode, network_mode, int, 0444);
+module_param_named(mode, network_mode, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)");
#else
-module_param_named(mode, network_mode, int, 0444);
+module_param_named(mode, network_mode, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)");
#endif
-module_param(bt_coexist, int, 0444);
+module_param(bt_coexist, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(bt_coexist, "enable bluetooth coexistence (default off)");
-module_param(hwcrypto, int, 0444);
+module_param(hwcrypto, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(hwcrypto, "enable hardware crypto (default off)");
-module_param(cmdlog, int, 0444);
+module_param(cmdlog, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(cmdlog,
"allocate a ring buffer for logging firmware commands");
-module_param(roaming, int, 0444);
+module_param(roaming, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(roaming, "enable roaming support (default on)");
-module_param(antenna, int, 0444);
+module_param(antenna, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(antenna, "select antenna 1=Main, 3=Aux, default 0 [both], 2=slow_diversity (choose the one with lower background noise)");
module_exit(ipw_exit);
--
2.9.2
^ permalink raw reply related
* [PATCH 0774/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
To: stas.yakovlev, kvalo, bkenward, linux-driver, computersforpeace,
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/intel/ipw2x00/ipw2100.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index bfa542c..e94e000 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -197,11 +197,11 @@ static struct ipw2100_fw ipw2100_firmware;
#endif
#include <linux/moduleparam.h>
-module_param(debug, int, 0444);
-module_param_named(mode, network_mode, int, 0444);
-module_param(channel, int, 0444);
-module_param(associate, int, 0444);
-module_param(disable, int, 0444);
+module_param(debug, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param_named(mode, network_mode, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(channel, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(associate, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(disable, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(debug, "debug level");
MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)");
--
2.9.2
^ permalink raw reply related
* [PATCH 0772/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:44 UTC (permalink / raw)
To: Larry.Finger, kvalo, bkenward, linux-driver, computersforpeace,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-wireless, b43-dev, 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/broadcom/b43legacy/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c
index 83770d2..a3303cd 100644
--- a/drivers/net/wireless/broadcom/b43legacy/main.c
+++ b/drivers/net/wireless/broadcom/b43legacy/main.c
@@ -65,7 +65,7 @@ MODULE_FIRMWARE("b43legacy/ucode4.fw");
#if defined(CONFIG_B43LEGACY_DMA) && defined(CONFIG_B43LEGACY_PIO)
static int modparam_pio;
-module_param_named(pio, modparam_pio, int, 0444);
+module_param_named(pio, modparam_pio, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(pio, "enable(1) / disable(0) PIO mode");
#elif defined(CONFIG_B43LEGACY_DMA)
# define modparam_pio 0
@@ -74,12 +74,12 @@ MODULE_PARM_DESC(pio, "enable(1) / disable(0) PIO mode");
#endif
static int modparam_bad_frames_preempt;
-module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
+module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(bad_frames_preempt, "enable(1) / disable(0) Bad Frames"
" Preemption");
static char modparam_fwpostfix[16];
-module_param_string(fwpostfix, modparam_fwpostfix, 16, 0444);
+module_param_string(fwpostfix, modparam_fwpostfix, 16, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(fwpostfix, "Postfix for the firmware files to load.");
/* The following table supports BCM4301, BCM4303 and BCM4306/2 devices. */
--
2.9.2
^ permalink raw reply related
* [PATCH 0773/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:45 UTC (permalink / raw)
To: Larry.Finger, kvalo, bkenward, linux-driver, computersforpeace,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-wireless, b43-dev, 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/broadcom/b43legacy/sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/b43legacy/sysfs.c b/drivers/net/wireless/broadcom/b43legacy/sysfs.c
index 2a1da15..e6543ff 100644
--- a/drivers/net/wireless/broadcom/b43legacy/sysfs.c
+++ b/drivers/net/wireless/broadcom/b43legacy/sysfs.c
@@ -150,7 +150,7 @@ static ssize_t b43legacy_attr_interfmode_store(struct device *dev,
return err ? err : count;
}
-static DEVICE_ATTR(interference, 0644,
+static DEVICE_ATTR(interference, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH,
b43legacy_attr_interfmode_show,
b43legacy_attr_interfmode_store);
@@ -203,7 +203,7 @@ static ssize_t b43legacy_attr_preamble_store(struct device *dev,
return count;
}
-static DEVICE_ATTR(shortpreamble, 0644,
+static DEVICE_ATTR(shortpreamble, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH,
b43legacy_attr_preamble_show,
b43legacy_attr_preamble_store);
--
2.9.2
^ permalink raw reply related
* [PATCH 0769/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:44 UTC (permalink / raw)
To: kvalo, bkenward, linux-driver, computersforpeace, m.chehab, pawel,
m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-wireless, netdev, linux-kernel, khoroshilov, johannes.berg,
chuansheng.liu, baolex.ni, pabeni
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/atmel/at76c50x-usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
index 7c10804..5313e6f 100644
--- a/drivers/net/wireless/atmel/at76c50x-usb.c
+++ b/drivers/net/wireless/atmel/at76c50x-usb.c
@@ -2596,7 +2596,7 @@ static void __exit at76_mod_exit(void)
led_trigger_unregister_simple(ledtrig_tx);
}
-module_param_named(debug, at76_debug, uint, 0600);
+module_param_named(debug, at76_debug, uint, S_IRUSR | S_IWUSR);
MODULE_PARM_DESC(debug, "Debugging level");
module_init(at76_mod_init);
--
2.9.2
^ permalink raw reply related
* [PATCH 0771/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:44 UTC (permalink / raw)
To: kvalo, bkenward, linux-driver, computersforpeace, m.chehab, pawel,
m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-wireless, b43-dev, 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/broadcom/b43/sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/b43/sysfs.c b/drivers/net/wireless/broadcom/b43/sysfs.c
index 3190493..5b664ff 100644
--- a/drivers/net/wireless/broadcom/b43/sysfs.c
+++ b/drivers/net/wireless/broadcom/b43/sysfs.c
@@ -135,7 +135,7 @@ static ssize_t b43_attr_interfmode_store(struct device *dev,
return err ? err : count;
}
-static DEVICE_ATTR(interference, 0644,
+static DEVICE_ATTR(interference, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH,
b43_attr_interfmode_show, b43_attr_interfmode_store);
int b43_sysfs_register(struct b43_wldev *wldev)
--
2.9.2
^ permalink raw reply related
* [PATCH 0768/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:44 UTC (permalink / raw)
To: k.eugene.e, kvalo, bkenward, linux-driver, computersforpeace,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: wcn36xx, linux-wireless, netdev, linux-kernel, chuansheng.liu,
baolex.ni, daniel, pabeni
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/ath/wcn36xx/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index a920d70..477f2b2 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -22,7 +22,7 @@
#include "wcn36xx.h"
unsigned int wcn36xx_dbg_mask;
-module_param_named(debug_mask, wcn36xx_dbg_mask, uint, 0644);
+module_param_named(debug_mask, wcn36xx_dbg_mask, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(debug_mask, "Debugging mask");
#define CHAN2G(_freq, _idx) { \
--
2.9.2
^ permalink raw reply related
* [PATCH 0766/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:44 UTC (permalink / raw)
To: ath9k-devel, kvalo, bkenward, linux-driver, computersforpeace,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-wireless, ath9k-devel, netdev, linux-kernel, chuansheng.liu,
baolex.ni, daniel, pabeni
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/ath/ath9k/htc_drv_init.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index c148c6c..3119d4f 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -27,24 +27,24 @@ module_param_named(debug, ath9k_debug, uint, 0);
MODULE_PARM_DESC(debug, "Debugging mask");
int htc_modparam_nohwcrypt;
-module_param_named(nohwcrypt, htc_modparam_nohwcrypt, int, 0444);
+module_param_named(nohwcrypt, htc_modparam_nohwcrypt, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
static int ath9k_htc_btcoex_enable;
-module_param_named(btcoex_enable, ath9k_htc_btcoex_enable, int, 0444);
+module_param_named(btcoex_enable, ath9k_htc_btcoex_enable, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence");
static int ath9k_ps_enable;
-module_param_named(ps_enable, ath9k_ps_enable, int, 0444);
+module_param_named(ps_enable, ath9k_ps_enable, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave");
int htc_use_dev_fw = 0;
-module_param_named(use_dev_fw, htc_use_dev_fw, int, 0444);
+module_param_named(use_dev_fw, htc_use_dev_fw, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(use_dev_fw, "Use development FW version");
#ifdef CONFIG_MAC80211_LEDS
int ath9k_htc_led_blink = 1;
-module_param_named(blink, ath9k_htc_led_blink, int, 0444);
+module_param_named(blink, ath9k_htc_led_blink, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(blink, "Enable LED blink on activity");
static const struct ieee80211_tpt_blink ath9k_htc_tpt_blink[] = {
--
2.9.2
^ permalink raw reply related
* [PATCH 0770/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:44 UTC (permalink / raw)
To: kvalo, bkenward, linux-driver, computersforpeace, m.chehab, pawel,
m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-wireless, b43-dev, netdev, linux-kernel, zajec5,
baijiaju1990, lars, 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/broadcom/b43/main.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
index 4ee5c58..cadd5bd 100644
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
@@ -76,44 +76,44 @@ MODULE_FIRMWARE("b43/ucode5.fw");
MODULE_FIRMWARE("b43/ucode9.fw");
static int modparam_bad_frames_preempt;
-module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
+module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(bad_frames_preempt,
"enable(1) / disable(0) Bad Frames Preemption");
static char modparam_fwpostfix[16];
-module_param_string(fwpostfix, modparam_fwpostfix, 16, 0444);
+module_param_string(fwpostfix, modparam_fwpostfix, 16, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(fwpostfix, "Postfix for the .fw files to load.");
static int modparam_hwpctl;
-module_param_named(hwpctl, modparam_hwpctl, int, 0444);
+module_param_named(hwpctl, modparam_hwpctl, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(hwpctl, "Enable hardware-side power control (default off)");
static int modparam_nohwcrypt;
-module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
+module_param_named(nohwcrypt, modparam_nohwcrypt, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
static int modparam_hwtkip;
-module_param_named(hwtkip, modparam_hwtkip, int, 0444);
+module_param_named(hwtkip, modparam_hwtkip, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(hwtkip, "Enable hardware tkip.");
static int modparam_qos = 1;
-module_param_named(qos, modparam_qos, int, 0444);
+module_param_named(qos, modparam_qos, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(qos, "Enable QOS support (default on)");
static int modparam_btcoex = 1;
-module_param_named(btcoex, modparam_btcoex, int, 0444);
+module_param_named(btcoex, modparam_btcoex, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(btcoex, "Enable Bluetooth coexistence (default on)");
int b43_modparam_verbose = B43_VERBOSITY_DEFAULT;
-module_param_named(verbose, b43_modparam_verbose, int, 0644);
+module_param_named(verbose, b43_modparam_verbose, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(verbose, "Log message verbosity: 0=error, 1=warn, 2=info(default), 3=debug");
static int b43_modparam_pio = 0;
-module_param_named(pio, b43_modparam_pio, int, 0644);
+module_param_named(pio, b43_modparam_pio, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
static int modparam_allhwsupport = !IS_ENABLED(CONFIG_BRCMSMAC);
-module_param_named(allhwsupport, modparam_allhwsupport, int, 0444);
+module_param_named(allhwsupport, modparam_allhwsupport, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(allhwsupport, "Enable support for all hardware (even it if overlaps with the brcmsmac driver)");
#ifdef CONFIG_B43_BCMA
--
2.9.2
^ permalink raw reply related
* [PATCH 0764/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:44 UTC (permalink / raw)
To: kvalo, linux-wimax, bkenward, linux-driver, computersforpeace,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: ath10k, linux-wireless, netdev, linux-kernel, chuansheng.liu,
baolex.ni, daniel, pabeni
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/ath/ath10k/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 8133d7b..0961a4e 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -41,10 +41,10 @@ enum ath10k_pci_reset_mode {
static unsigned int ath10k_pci_irq_mode = ATH10K_PCI_IRQ_AUTO;
static unsigned int ath10k_pci_reset_mode = ATH10K_PCI_RESET_AUTO;
-module_param_named(irq_mode, ath10k_pci_irq_mode, uint, 0644);
+module_param_named(irq_mode, ath10k_pci_irq_mode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(irq_mode, "0: auto, 1: legacy, 2: msi (default: 0)");
-module_param_named(reset_mode, ath10k_pci_reset_mode, uint, 0644);
+module_param_named(reset_mode, ath10k_pci_reset_mode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(reset_mode, "0: auto, 1: warm only (default: 0)");
/* how long wait to wait for target to initialise, in ms */
--
2.9.2
^ permalink raw reply related
* [PATCH 0763/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:43 UTC (permalink / raw)
To: kvalo, linux-wimax, bkenward, linux-driver, computersforpeace,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: ath10k, linux-wireless, netdev, linux-kernel, chuansheng.liu,
baolex.ni, daniel, pabeni
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/ath/ath10k/core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 49af624..9e42274 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -36,11 +36,11 @@ static bool uart_print;
static bool skip_otp;
static bool rawmode;
-module_param_named(debug_mask, ath10k_debug_mask, uint, 0644);
-module_param_named(cryptmode, ath10k_cryptmode_param, uint, 0644);
-module_param(uart_print, bool, 0644);
-module_param(skip_otp, bool, 0644);
-module_param(rawmode, bool, 0644);
+module_param_named(debug_mask, ath10k_debug_mask, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param_named(cryptmode, ath10k_cryptmode_param, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(uart_print, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(skip_otp, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rawmode, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(debug_mask, "Debugging mask");
MODULE_PARM_DESC(uart_print, "Uart target debugging");
--
2.9.2
^ permalink raw reply related
* [PATCH 0767/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:44 UTC (permalink / raw)
To: ath9k-devel, kvalo, bkenward, linux-driver, computersforpeace,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-wireless, ath9k-devel, netdev, linux-kernel, chuansheng.liu,
baolex.ni, daniel, pabeni
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/ath/ath9k/init.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 2ee8624..5196633 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -42,33 +42,33 @@ module_param_named(debug, ath9k_debug, uint, 0);
MODULE_PARM_DESC(debug, "Debugging mask");
int ath9k_modparam_nohwcrypt;
-module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, 0444);
+module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
int ath9k_led_blink;
-module_param_named(blink, ath9k_led_blink, int, 0444);
+module_param_named(blink, ath9k_led_blink, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(blink, "Enable LED blink on activity");
static int ath9k_led_active_high = -1;
-module_param_named(led_active_high, ath9k_led_active_high, int, 0444);
+module_param_named(led_active_high, ath9k_led_active_high, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(led_active_high, "Invert LED polarity");
static int ath9k_btcoex_enable;
-module_param_named(btcoex_enable, ath9k_btcoex_enable, int, 0444);
+module_param_named(btcoex_enable, ath9k_btcoex_enable, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence");
static int ath9k_bt_ant_diversity;
-module_param_named(bt_ant_diversity, ath9k_bt_ant_diversity, int, 0444);
+module_param_named(bt_ant_diversity, ath9k_bt_ant_diversity, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(bt_ant_diversity, "Enable WLAN/BT RX antenna diversity");
static int ath9k_ps_enable;
-module_param_named(ps_enable, ath9k_ps_enable, int, 0444);
+module_param_named(ps_enable, ath9k_ps_enable, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave");
#ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
int ath9k_use_chanctx;
-module_param_named(use_chanctx, ath9k_use_chanctx, int, 0444);
+module_param_named(use_chanctx, ath9k_use_chanctx, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(use_chanctx, "Enable channel context for concurrency");
#endif /* CONFIG_ATH9K_CHANNEL_CONTEXT */
--
2.9.2
^ permalink raw reply related
* [PATCH 0765/1285] Replace numeric parameter like 0444 with macro
From: Baole Ni @ 2016-08-02 11:44 UTC (permalink / raw)
To: kvalo, linux-wimax, bkenward, linux-driver, computersforpeace,
m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
Cc: linux-wireless, netdev, linux-kernel, chuansheng.liu, baolex.ni,
daniel, pabeni
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/ath/ath6kl/core.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/core.c b/drivers/net/wireless/ath/ath6kl/core.c
index ebb9f16..6b5b18b 100644
--- a/drivers/net/wireless/ath/ath6kl/core.c
+++ b/drivers/net/wireless/ath/ath6kl/core.c
@@ -37,15 +37,15 @@ static unsigned int testmode;
static unsigned int recovery_enable;
static unsigned int heart_beat_poll;
-module_param(debug_mask, uint, 0644);
-module_param(suspend_mode, uint, 0644);
-module_param(wow_mode, uint, 0644);
-module_param(uart_debug, uint, 0644);
-module_param(uart_rate, uint, 0644);
-module_param(ath6kl_p2p, uint, 0644);
-module_param(testmode, uint, 0644);
-module_param(recovery_enable, uint, 0644);
-module_param(heart_beat_poll, uint, 0644);
+module_param(debug_mask, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(suspend_mode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(wow_mode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(uart_debug, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(uart_rate, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(ath6kl_p2p, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(testmode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(recovery_enable, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(heart_beat_poll, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(recovery_enable, "Enable recovery from firmware error");
MODULE_PARM_DESC(heart_beat_poll,
"Enable fw error detection periodic polling in msecs - Also set recovery_enable for this to be effective");
--
2.9.2
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox