Skip to contentSkip to conversation

PM: replace S_IRUGO with octal numbers

PATCH In review [email protected] 2 participants 2 messages Feb 9, 2020 – Feb 10, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PM: replace S_IRUGO with octal numbers

From: Peng Fan <[email protected]>

Per commit f90774e1fd27 ("checkpatch: look for symbolic permissions and suggest octal instead"), octal numbers is preferred, so replace S_IRUGO with octal numbers.

---
 drivers/base/power/domain.c | 2 +-
 drivers/base/power/wakeup.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/base/power/domain.c +1 -1
index 959d6d5eb000..0a2d0360c014 100644
@@ -3054,7 +3054,7 @@ static int __init genpd_debug_init(void)
 
 	genpd_debugfs_dir = debugfs_create_dir("pm_genpd", NULL);
 
-	debugfs_create_file("pm_genpd_summary", S_IRUGO, genpd_debugfs_dir,
+	debugfs_create_file("pm_genpd_summary", 0444, genpd_debugfs_dir,
 			    NULL, &summary_fops);
 
 	list_for_each_entry(genpd, &gpd_list, gpd_list_node) {
drivers/base/power/wakeup.c +1 -1
index 27f3e60608e5..7970797ad8f6 100644
@@ -1174,7 +1174,7 @@ static const struct file_operations wakeup_sources_stats_fops = {
 
 static int __init wakeup_sources_debugfs_init(void)
 {
-	debugfs_create_file("wakeup_sources", S_IRUGO, NULL, NULL,
+	debugfs_create_file("wakeup_sources", 0444, NULL, NULL,
 			    &wakeup_sources_stats_fops);
 	return 0;
 }
Signature · 1 line
2.16.4
#1 lore raw
Quoted 5 lines · On Sun, Feb 9, 2020 at 9:39 AM <[email protected]> wrote:

From: Peng Fan <[email protected]>

Per commit f90774e1fd27 ("checkpatch: look for symbolic permissions and suggest octal instead"),

This applies to new patches.

Quoted 1 line

octal numbers is preferred, so replace S_IRUGO with octal numbers.

Not really.

Thanks!