Skip to contentSkip to conversation

Staging: android: fixed permissions style issue

PATCH Superseded Eric Salem 2 participants 3 messages Sep 26, 2016 Staging

lore
Share & tools
lore

Eric Salem

author
#0 lore raw

PATCH 1/1 Staging: android: fixed permissions style issue

Fixed a coding style issue. Changed symbolic permissions to octal.

---
 drivers/staging/android/lowmemorykiller.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/android/lowmemorykiller.c +4 -4
index 80d7adf..553a3ee 100644
@@ -204,10 +204,10 @@ device_initcall(lowmem_init);
  * not really modular, but the easiest way to keep compat with existing
  * bootargs behaviour is to continue using module_param here.
  */
-module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR);
+module_param_named(cost, lowmem_shrinker.seeks, int, 0644);
 module_param_array_named(adj, lowmem_adj, short, &lowmem_adj_size,
-			 S_IRUGO | S_IWUSR);
+			 0644);
 module_param_array_named(minfree, lowmem_minfree, uint, &lowmem_minfree_size,
-			 S_IRUGO | S_IWUSR);
-module_param_named(debug_level, lowmem_debug_level, uint, S_IRUGO | S_IWUSR);
+			 0644);
+module_param_named(debug_level, lowmem_debug_level, uint, 0644);
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 1 line · Eric Salem

Fixed a coding style issue. Changed symbolic permissions to octal.

If you do these, please shorten the lines where possible.

drivers/staging/android/lowmemorykiller.c

Quoted 1 line
drivers/staging/android/lowmemorykiller.c +0 -0

[]

drivers/staging/android/lowmemorykiller.c device_initcall(lowmem_init); · line 209

Quoted 9 lines
drivers/staging/android/lowmemorykiller.c +2 -2
@@ -204,10 +204,10 @@ device_initcall(lowmem_init);
  * not really modular, but the easiest way to keep compat with existing
  * bootargs behaviour is to continue using module_param here.
  */
-module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR);
+module_param_named(cost, lowmem_shrinker.seeks, int, 0644);
 module_param_array_named(adj, lowmem_adj, short, &lowmem_adj_size,
-			 S_IRUGO | S_IWUSR);
+			 0644);

module_param_array_named(adj, lowmem_adj, short, &lowmem_adj_size, 0644);

etc...

author
#2 lore raw

PATCH v2 1/1 Staging: android: fixed permissions style issue

Fixed a coding style issue. Changed symbolic permissions to octal.

---
 drivers/staging/android/lowmemorykiller.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/android/lowmemorykiller.c +4 -5
index 80d7adf..ec3b665 100644
@@ -204,10 +204,9 @@ device_initcall(lowmem_init);
  * not really modular, but the easiest way to keep compat with existing
  * bootargs behaviour is to continue using module_param here.
  */
-module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR);
-module_param_array_named(adj, lowmem_adj, short, &lowmem_adj_size,
-			 S_IRUGO | S_IWUSR);
+module_param_named(cost, lowmem_shrinker.seeks, int, 0644);
+module_param_array_named(adj, lowmem_adj, short, &lowmem_adj_size, 0644);
 module_param_array_named(minfree, lowmem_minfree, uint, &lowmem_minfree_size,
-			 S_IRUGO | S_IWUSR);
-module_param_named(debug_level, lowmem_debug_level, uint, S_IRUGO | S_IWUSR);
+			 0644);
+module_param_named(debug_level, lowmem_debug_level, uint, 0644);
 
Signature · 1 line
2.7.4
Quoted 21 lines · Joe Perches
Quoted 1 line · Eric Salem

Fixed a coding style issue. Changed symbolic permissions to octal.

If you do these, please shorten the lines where possible.

drivers/staging/android/lowmemorykiller.c

Quoted 1 line
drivers/staging/android/lowmemorykiller.c +0 -0

[]

drivers/staging/android/lowmemorykiller.c device_initcall(lowmem_init); · line 209

Quoted 9 lines
drivers/staging/android/lowmemorykiller.c +2 -2
@@ -204,10 +204,10 @@ device_initcall(lowmem_init);
  * not really modular, but the easiest way to keep compat with existing
  * bootargs behaviour is to continue using module_param here.
  */
-module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR);
+module_param_named(cost, lowmem_shrinker.seeks, int, 0644);
 module_param_array_named(adj, lowmem_adj, short, &lowmem_adj_size,
-			 S_IRUGO | S_IWUSR);
+			 0644);

module_param_array_named(adj, lowmem_adj, short, &lowmem_adj_size, 0644);

etc...