diff options
author | Joe Perches <joe@perches.com> | 2018-03-23 15:54:37 -0700 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-03-27 11:01:13 +0300 |
commit | 2ef00c53049b6a8758d118188992da01d75f3628 (patch) | |
tree | f7eb61964d5504c7d5c8bc7f675fd1fe810eb7f9 /drivers/net/wireless/intel/iwlegacy | |
parent | 255dd5b79d5474dad3ecebe99be7818684921abd (diff) |
wireless: Use octal not symbolic permissions
Prefer the direct use of octal for permissions.
Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace
and some typing.
Miscellanea:
o Whitespace neatening around these conversions.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel/iwlegacy')
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/3945-mac.c | 35 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/4965-mac.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/4965-rs.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/common.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/debug.c | 58 |
5 files changed, 59 insertions, 65 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c index 4b53ebf00c7f..62a9794f952b 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c @@ -3122,7 +3122,7 @@ il3945_store_debug_level(struct device *d, struct device_attribute *attr, return strnlen(buf, count); } -static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, il3945_show_debug_level, +static DEVICE_ATTR(debug_level, 0644, il3945_show_debug_level, il3945_store_debug_level); #endif /* CONFIG_IWLEGACY_DEBUG */ @@ -3139,7 +3139,7 @@ il3945_show_temperature(struct device *d, struct device_attribute *attr, return sprintf(buf, "%d\n", il3945_hw_get_temperature(il)); } -static DEVICE_ATTR(temperature, S_IRUGO, il3945_show_temperature, NULL); +static DEVICE_ATTR(temperature, 0444, il3945_show_temperature, NULL); static ssize_t il3945_show_tx_power(struct device *d, struct device_attribute *attr, char *buf) @@ -3165,8 +3165,7 @@ il3945_store_tx_power(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, il3945_show_tx_power, - il3945_store_tx_power); +static DEVICE_ATTR(tx_power, 0644, il3945_show_tx_power, il3945_store_tx_power); static ssize_t il3945_show_flags(struct device *d, struct device_attribute *attr, char *buf) @@ -3199,8 +3198,7 @@ il3945_store_flags(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, il3945_show_flags, - il3945_store_flags); +static DEVICE_ATTR(flags, 0644, il3945_show_flags, il3945_store_flags); static ssize_t il3945_show_filter_flags(struct device *d, struct device_attribute *attr, @@ -3235,7 +3233,7 @@ il3945_store_filter_flags(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(filter_flags, S_IWUSR | S_IRUGO, il3945_show_filter_flags, +static DEVICE_ATTR(filter_flags, 0644, il3945_show_filter_flags, il3945_store_filter_flags); static ssize_t @@ -3306,7 +3304,7 @@ il3945_store_measurement(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(measurement, S_IRUSR | S_IWUSR, il3945_show_measurement, +static DEVICE_ATTR(measurement, 0600, il3945_show_measurement, il3945_store_measurement); static ssize_t @@ -3330,7 +3328,7 @@ il3945_show_retry_rate(struct device *d, struct device_attribute *attr, return sprintf(buf, "%d", il->retry_rate); } -static DEVICE_ATTR(retry_rate, S_IWUSR | S_IRUSR, il3945_show_retry_rate, +static DEVICE_ATTR(retry_rate, 0600, il3945_show_retry_rate, il3945_store_retry_rate); static ssize_t @@ -3340,7 +3338,7 @@ il3945_show_channels(struct device *d, struct device_attribute *attr, char *buf) return 0; } -static DEVICE_ATTR(channels, S_IRUSR, il3945_show_channels, NULL); +static DEVICE_ATTR(channels, 0400, il3945_show_channels, NULL); static ssize_t il3945_show_antenna(struct device *d, struct device_attribute *attr, char *buf) @@ -3377,8 +3375,7 @@ il3945_store_antenna(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(antenna, S_IWUSR | S_IRUGO, il3945_show_antenna, - il3945_store_antenna); +static DEVICE_ATTR(antenna, 0644, il3945_show_antenna, il3945_store_antenna); static ssize_t il3945_show_status(struct device *d, struct device_attribute *attr, char *buf) @@ -3389,7 +3386,7 @@ il3945_show_status(struct device *d, struct device_attribute *attr, char *buf) return sprintf(buf, "0x%08x\n", (int)il->status); } -static DEVICE_ATTR(status, S_IRUGO, il3945_show_status, NULL); +static DEVICE_ATTR(status, 0444, il3945_show_status, NULL); static ssize_t il3945_dump_error_log(struct device *d, struct device_attribute *attr, @@ -3404,7 +3401,7 @@ il3945_dump_error_log(struct device *d, struct device_attribute *attr, return strnlen(buf, count); } -static DEVICE_ATTR(dump_errors, S_IWUSR, NULL, il3945_dump_error_log); +static DEVICE_ATTR(dump_errors, 0200, NULL, il3945_dump_error_log); /***************************************************************************** * @@ -3943,18 +3940,18 @@ il3945_exit(void) MODULE_FIRMWARE(IL3945_MODULE_FIRMWARE(IL3945_UCODE_API_MAX)); -module_param_named(antenna, il3945_mod_params.antenna, int, S_IRUGO); +module_param_named(antenna, il3945_mod_params.antenna, int, 0444); MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])"); -module_param_named(swcrypto, il3945_mod_params.sw_crypto, int, S_IRUGO); +module_param_named(swcrypto, il3945_mod_params.sw_crypto, int, 0444); MODULE_PARM_DESC(swcrypto, "using software crypto (default 1 [software])"); module_param_named(disable_hw_scan, il3945_mod_params.disable_hw_scan, int, - S_IRUGO); + 0444); MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)"); #ifdef CONFIG_IWLEGACY_DEBUG -module_param_named(debug, il_debug_level, uint, S_IRUGO | S_IWUSR); +module_param_named(debug, il_debug_level, uint, 0644); MODULE_PARM_DESC(debug, "debug output mask"); #endif -module_param_named(fw_restart, il3945_mod_params.restart_fw, int, S_IRUGO); +module_param_named(fw_restart, il3945_mod_params.restart_fw, int, 0444); MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); module_exit(il3945_exit); diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index de63f2518f23..562e94870a9c 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c @@ -4591,7 +4591,7 @@ il4965_store_debug_level(struct device *d, struct device_attribute *attr, return strnlen(buf, count); } -static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, il4965_show_debug_level, +static DEVICE_ATTR(debug_level, 0644, il4965_show_debug_level, il4965_store_debug_level); #endif /* CONFIG_IWLEGACY_DEBUG */ @@ -4608,7 +4608,7 @@ il4965_show_temperature(struct device *d, struct device_attribute *attr, return sprintf(buf, "%d\n", il->temperature); } -static DEVICE_ATTR(temperature, S_IRUGO, il4965_show_temperature, NULL); +static DEVICE_ATTR(temperature, 0444, il4965_show_temperature, NULL); static ssize_t il4965_show_tx_power(struct device *d, struct device_attribute *attr, char *buf) @@ -4642,7 +4642,7 @@ il4965_store_tx_power(struct device *d, struct device_attribute *attr, return ret; } -static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, il4965_show_tx_power, +static DEVICE_ATTR(tx_power, 0644, il4965_show_tx_power, il4965_store_tx_power); static struct attribute *il_sysfs_entries[] = { @@ -6859,18 +6859,17 @@ module_exit(il4965_exit); module_init(il4965_init); #ifdef CONFIG_IWLEGACY_DEBUG -module_param_named(debug, il_debug_level, uint, S_IRUGO | S_IWUSR); +module_param_named(debug, il_debug_level, uint, 0644); MODULE_PARM_DESC(debug, "debug output mask"); #endif -module_param_named(swcrypto, il4965_mod_params.sw_crypto, int, S_IRUGO); +module_param_named(swcrypto, il4965_mod_params.sw_crypto, int, 0444); MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])"); -module_param_named(queues_num, il4965_mod_params.num_of_queues, int, S_IRUGO); +module_param_named(queues_num, il4965_mod_params.num_of_queues, int, 0444); MODULE_PARM_DESC(queues_num, "number of hw queues."); -module_param_named(11n_disable, il4965_mod_params.disable_11n, int, S_IRUGO); +module_param_named(11n_disable, il4965_mod_params.disable_11n, int, 0444); MODULE_PARM_DESC(11n_disable, "disable 11n functionality"); -module_param_named(amsdu_size_8K, il4965_mod_params.amsdu_size_8K, int, - S_IRUGO); +module_param_named(amsdu_size_8K, il4965_mod_params.amsdu_size_8K, int, 0444); MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size (default 0 [disabled])"); -module_param_named(fw_restart, il4965_mod_params.restart_fw, int, S_IRUGO); +module_param_named(fw_restart, il4965_mod_params.restart_fw, int, 0444); MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); diff --git a/drivers/net/wireless/intel/iwlegacy/4965-rs.c b/drivers/net/wireless/intel/iwlegacy/4965-rs.c index 365a4187fc37..54ff83829afb 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-rs.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-rs.c @@ -2768,16 +2768,16 @@ il4965_rs_add_debugfs(void *il, void *il_sta, struct dentry *dir) { struct il_lq_sta *lq_sta = il_sta; lq_sta->rs_sta_dbgfs_scale_table_file = - debugfs_create_file("rate_scale_table", S_IRUSR | S_IWUSR, dir, + debugfs_create_file("rate_scale_table", 0600, dir, lq_sta, &rs_sta_dbgfs_scale_table_ops); lq_sta->rs_sta_dbgfs_stats_table_file = - debugfs_create_file("rate_stats_table", S_IRUSR, dir, lq_sta, + debugfs_create_file("rate_stats_table", 0400, dir, lq_sta, &rs_sta_dbgfs_stats_table_ops); lq_sta->rs_sta_dbgfs_rate_scale_data_file = - debugfs_create_file("rate_scale_data", S_IRUSR, dir, lq_sta, + debugfs_create_file("rate_scale_data", 0400, dir, lq_sta, &rs_sta_dbgfs_rate_scale_data_ops); lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file = - debugfs_create_u8("tx_agg_tid_enable", S_IRUSR | S_IWUSR, dir, + debugfs_create_u8("tx_agg_tid_enable", 0600, dir, &lq_sta->tx_agg_tid_en); } diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c index 558bb16bfd46..063e19ced7c8 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.c +++ b/drivers/net/wireless/intel/iwlegacy/common.c @@ -435,7 +435,7 @@ EXPORT_SYMBOL(il_send_cmd_pdu_async); /* default: IL_LED_BLINK(0) using blinking idx table */ static int led_mode; -module_param(led_mode, int, S_IRUGO); +module_param(led_mode, int, 0444); MODULE_PARM_DESC(led_mode, "0=system default, " "1=On(RF On)/Off(RF Off), 2=blinking"); @@ -3372,7 +3372,7 @@ MODULE_LICENSE("GPL"); * default: bt_coex_active = true (BT_COEX_ENABLE) */ static bool bt_coex_active = true; -module_param(bt_coex_active, bool, S_IRUGO); +module_param(bt_coex_active, bool, 0444); MODULE_PARM_DESC(bt_coex_active, "enable wifi/bluetooth co-exist"); u32 il_debug_level; diff --git a/drivers/net/wireless/intel/iwlegacy/debug.c b/drivers/net/wireless/intel/iwlegacy/debug.c index 6fc6b7ff9849..d76073def677 100644 --- a/drivers/net/wireless/intel/iwlegacy/debug.c +++ b/drivers/net/wireless/intel/iwlegacy/debug.c @@ -135,16 +135,14 @@ EXPORT_SYMBOL(il_update_stats); #define DEBUGFS_ADD_BOOL(name, parent, ptr) do { \ struct dentry *__tmp; \ - __tmp = debugfs_create_bool(#name, S_IWUSR | S_IRUSR, \ - parent, ptr); \ + __tmp = debugfs_create_bool(#name, 0600, parent, ptr); \ if (IS_ERR(__tmp) || !__tmp) \ goto err; \ } while (0) #define DEBUGFS_ADD_X32(name, parent, ptr) do { \ struct dentry *__tmp; \ - __tmp = debugfs_create_x32(#name, S_IWUSR | S_IRUSR, \ - parent, ptr); \ + __tmp = debugfs_create_x32(#name, 0600, parent, ptr); \ if (IS_ERR(__tmp) || !__tmp) \ goto err; \ } while (0) @@ -1365,35 +1363,35 @@ il_dbgfs_register(struct il_priv *il, const char *name) if (!dir_debug) goto err; - DEBUGFS_ADD_FILE(nvm, dir_data, S_IRUSR); - DEBUGFS_ADD_FILE(sram, dir_data, S_IWUSR | S_IRUSR); - DEBUGFS_ADD_FILE(stations, dir_data, S_IRUSR); - DEBUGFS_ADD_FILE(channels, dir_data, S_IRUSR); - DEBUGFS_ADD_FILE(status, dir_data, S_IRUSR); - DEBUGFS_ADD_FILE(interrupt, dir_data, S_IWUSR | S_IRUSR); - DEBUGFS_ADD_FILE(qos, dir_data, S_IRUSR); - DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); - DEBUGFS_ADD_FILE(rx_stats, dir_debug, S_IRUSR); - DEBUGFS_ADD_FILE(tx_stats, dir_debug, S_IRUSR); - DEBUGFS_ADD_FILE(rx_queue, dir_debug, S_IRUSR); - DEBUGFS_ADD_FILE(tx_queue, dir_debug, S_IRUSR); - DEBUGFS_ADD_FILE(power_save_status, dir_debug, S_IRUSR); - DEBUGFS_ADD_FILE(clear_ucode_stats, dir_debug, S_IWUSR); - DEBUGFS_ADD_FILE(clear_traffic_stats, dir_debug, S_IWUSR); - DEBUGFS_ADD_FILE(fh_reg, dir_debug, S_IRUSR); - DEBUGFS_ADD_FILE(missed_beacon, dir_debug, S_IWUSR); - DEBUGFS_ADD_FILE(force_reset, dir_debug, S_IWUSR | S_IRUSR); - DEBUGFS_ADD_FILE(ucode_rx_stats, dir_debug, S_IRUSR); - DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, S_IRUSR); - DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, S_IRUSR); + DEBUGFS_ADD_FILE(nvm, dir_data, 0400); + DEBUGFS_ADD_FILE(sram, dir_data, 0600); + DEBUGFS_ADD_FILE(stations, dir_data, 0400); + DEBUGFS_ADD_FILE(channels, dir_data, 0400); + DEBUGFS_ADD_FILE(status, dir_data, 0400); + DEBUGFS_ADD_FILE(interrupt, dir_data, 0600); + DEBUGFS_ADD_FILE(qos, dir_data, 0400); + DEBUGFS_ADD_FILE(disable_ht40, dir_data, 0600); + DEBUGFS_ADD_FILE(rx_stats, dir_debug, 0400); + DEBUGFS_ADD_FILE(tx_stats, dir_debug, 0400); + DEBUGFS_ADD_FILE(rx_queue, dir_debug, 0400); + DEBUGFS_ADD_FILE(tx_queue, dir_debug, 0400); + DEBUGFS_ADD_FILE(power_save_status, dir_debug, 0400); + DEBUGFS_ADD_FILE(clear_ucode_stats, dir_debug, 0200); + DEBUGFS_ADD_FILE(clear_traffic_stats, dir_debug, 0200); + DEBUGFS_ADD_FILE(fh_reg, dir_debug, 0400); + DEBUGFS_ADD_FILE(missed_beacon, dir_debug, 0200); + DEBUGFS_ADD_FILE(force_reset, dir_debug, 0600); + DEBUGFS_ADD_FILE(ucode_rx_stats, dir_debug, 0400); + DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, 0400); + DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, 0400); if (il->cfg->sensitivity_calib_by_driver) - DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR); + DEBUGFS_ADD_FILE(sensitivity, dir_debug, 0400); if (il->cfg->chain_noise_calib_by_driver) - DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR); - DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); - DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); - DEBUGFS_ADD_FILE(wd_timeout, dir_debug, S_IWUSR); + DEBUGFS_ADD_FILE(chain_noise, dir_debug, 0400); + DEBUGFS_ADD_FILE(rxon_flags, dir_debug, 0200); + DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, 0200); + DEBUGFS_ADD_FILE(wd_timeout, dir_debug, 0200); if (il->cfg->sensitivity_calib_by_driver) DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, &il->disable_sens_cal); |