platform/chrome: cros_ec_debugfs: Use octal permissions '0444'
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Fri, 23 Mar 2018 17:42:45 +0000 (18:42 +0100)
committerBenson Leung <bleung@chromium.org>
Wed, 11 Apr 2018 05:24:16 +0000 (22:24 -0700)
Fixed the following checkpatch warning:

    WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
    using octal permissions '0444'.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
drivers/platform/chrome/cros_ec_debugfs.c

index 0e88e18..5394030 100644 (file)
@@ -288,7 +288,7 @@ static int cros_ec_create_console_log(struct cros_ec_debugfs *debug_info)
        init_waitqueue_head(&debug_info->log_wq);
 
        if (!debugfs_create_file("console_log",
-                                S_IFREG | S_IRUGO,
+                                S_IFREG | 0444,
                                 debug_info->dir,
                                 debug_info,
                                 &cros_ec_console_log_fops))
@@ -341,7 +341,7 @@ static int cros_ec_create_panicinfo(struct cros_ec_debugfs *debug_info)
        debug_info->panicinfo_blob.size = ret;
 
        if (!debugfs_create_blob("panicinfo",
-                                S_IFREG | S_IRUGO,
+                                S_IFREG | 0444,
                                 debug_info->dir,
                                 &debug_info->panicinfo_blob)) {
                ret = -ENOMEM;