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>
Este commit está contenido en:
@@ -37,7 +37,7 @@
|
||||
* Allow hardware encryption to be disabled.
|
||||
*/
|
||||
static bool modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
|
||||
|
||||
/*
|
||||
|
@@ -49,7 +49,7 @@
|
||||
* Allow hardware encryption to be disabled.
|
||||
*/
|
||||
static bool modparam_nohwcrypt = false;
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
|
||||
|
||||
static bool rt2800pci_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
|
||||
|
@@ -41,7 +41,7 @@
|
||||
|
||||
/* Allow hardware encryption to be disabled. */
|
||||
static bool modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
|
||||
|
||||
static bool rt2800soc_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
|
||||
|
@@ -43,7 +43,7 @@
|
||||
* Allow hardware encryption to be disabled.
|
||||
*/
|
||||
static bool modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
|
||||
|
||||
static bool rt2800usb_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
|
||||
|
@@ -606,7 +606,7 @@ static struct dentry *rt2x00debug_create_file_driver(const char *name,
|
||||
data += sprintf(data, "version:\t%s\n", DRV_VERSION);
|
||||
blob->size = strlen(blob->data);
|
||||
|
||||
return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob);
|
||||
return debugfs_create_blob(name, 0400, intf->driver_folder, blob);
|
||||
}
|
||||
|
||||
static struct dentry *rt2x00debug_create_file_chipset(const char *name,
|
||||
@@ -647,7 +647,7 @@ static struct dentry *rt2x00debug_create_file_chipset(const char *name,
|
||||
|
||||
blob->size = strlen(blob->data);
|
||||
|
||||
return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob);
|
||||
return debugfs_create_blob(name, 0400, intf->driver_folder, blob);
|
||||
}
|
||||
|
||||
void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
|
||||
@@ -682,13 +682,13 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
|
||||
if (IS_ERR(intf->chipset_entry) || !intf->chipset_entry)
|
||||
goto exit;
|
||||
|
||||
intf->dev_flags = debugfs_create_file("dev_flags", S_IRUSR,
|
||||
intf->dev_flags = debugfs_create_file("dev_flags", 0400,
|
||||
intf->driver_folder, intf,
|
||||
&rt2x00debug_fop_dev_flags);
|
||||
if (IS_ERR(intf->dev_flags) || !intf->dev_flags)
|
||||
goto exit;
|
||||
|
||||
intf->cap_flags = debugfs_create_file("cap_flags", S_IRUSR,
|
||||
intf->cap_flags = debugfs_create_file("cap_flags", 0400,
|
||||
intf->driver_folder, intf,
|
||||
&rt2x00debug_fop_cap_flags);
|
||||
if (IS_ERR(intf->cap_flags) || !intf->cap_flags)
|
||||
@@ -699,27 +699,28 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
|
||||
if (IS_ERR(intf->register_folder) || !intf->register_folder)
|
||||
goto exit;
|
||||
|
||||
#define RT2X00DEBUGFS_CREATE_REGISTER_ENTRY(__intf, __name) \
|
||||
({ \
|
||||
if (debug->__name.read) { \
|
||||
(__intf)->__name##_off_entry = \
|
||||
debugfs_create_u32(__stringify(__name) "_offset", \
|
||||
S_IRUSR | S_IWUSR, \
|
||||
(__intf)->register_folder, \
|
||||
&(__intf)->offset_##__name); \
|
||||
if (IS_ERR((__intf)->__name##_off_entry) \
|
||||
|| !(__intf)->__name##_off_entry) \
|
||||
goto exit; \
|
||||
\
|
||||
(__intf)->__name##_val_entry = \
|
||||
debugfs_create_file(__stringify(__name) "_value", \
|
||||
S_IRUSR | S_IWUSR, \
|
||||
(__intf)->register_folder, \
|
||||
(__intf), &rt2x00debug_fop_##__name); \
|
||||
if (IS_ERR((__intf)->__name##_val_entry) \
|
||||
|| !(__intf)->__name##_val_entry) \
|
||||
goto exit; \
|
||||
} \
|
||||
#define RT2X00DEBUGFS_CREATE_REGISTER_ENTRY(__intf, __name) \
|
||||
({ \
|
||||
if (debug->__name.read) { \
|
||||
(__intf)->__name##_off_entry = \
|
||||
debugfs_create_u32(__stringify(__name) "_offset", \
|
||||
0600, \
|
||||
(__intf)->register_folder, \
|
||||
&(__intf)->offset_##__name); \
|
||||
if (IS_ERR((__intf)->__name##_off_entry) || \
|
||||
!(__intf)->__name##_off_entry) \
|
||||
goto exit; \
|
||||
\
|
||||
(__intf)->__name##_val_entry = \
|
||||
debugfs_create_file(__stringify(__name) "_value", \
|
||||
0600, \
|
||||
(__intf)->register_folder, \
|
||||
(__intf), \
|
||||
&rt2x00debug_fop_##__name); \
|
||||
if (IS_ERR((__intf)->__name##_val_entry) || \
|
||||
!(__intf)->__name##_val_entry) \
|
||||
goto exit; \
|
||||
} \
|
||||
})
|
||||
|
||||
RT2X00DEBUGFS_CREATE_REGISTER_ENTRY(intf, csr);
|
||||
@@ -736,8 +737,8 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
|
||||
goto exit;
|
||||
|
||||
intf->queue_frame_dump_entry =
|
||||
debugfs_create_file("dump", S_IRUSR, intf->queue_folder,
|
||||
intf, &rt2x00debug_fop_queue_dump);
|
||||
debugfs_create_file("dump", 0400, intf->queue_folder,
|
||||
intf, &rt2x00debug_fop_queue_dump);
|
||||
if (IS_ERR(intf->queue_frame_dump_entry)
|
||||
|| !intf->queue_frame_dump_entry)
|
||||
goto exit;
|
||||
@@ -746,14 +747,15 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
|
||||
init_waitqueue_head(&intf->frame_dump_waitqueue);
|
||||
|
||||
intf->queue_stats_entry =
|
||||
debugfs_create_file("queue", S_IRUSR, intf->queue_folder,
|
||||
intf, &rt2x00debug_fop_queue_stats);
|
||||
debugfs_create_file("queue", 0400, intf->queue_folder,
|
||||
intf, &rt2x00debug_fop_queue_stats);
|
||||
|
||||
#ifdef CONFIG_RT2X00_LIB_CRYPTO
|
||||
if (rt2x00_has_cap_hw_crypto(rt2x00dev))
|
||||
intf->crypto_stats_entry =
|
||||
debugfs_create_file("crypto", S_IRUGO, intf->queue_folder,
|
||||
intf, &rt2x00debug_fop_crypto_stats);
|
||||
debugfs_create_file("crypto", 0444, intf->queue_folder,
|
||||
intf,
|
||||
&rt2x00debug_fop_crypto_stats);
|
||||
#endif
|
||||
|
||||
return;
|
||||
|
@@ -40,7 +40,7 @@
|
||||
* Allow hardware encryption to be disabled.
|
||||
*/
|
||||
static bool modparam_nohwcrypt = false;
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
|
||||
|
||||
/*
|
||||
|
@@ -38,7 +38,7 @@
|
||||
* Allow hardware encryption to be disabled.
|
||||
*/
|
||||
static bool modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
|
||||
|
||||
/*
|
||||
|
Referencia en una nueva incidencia
Block a user