lkml.org 
[lkml]   [2019]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/13] nvdimm: Use octal permissions
Date
Avoid the use of the S_IRUGO define and use 0444 to improve readability
and use a more common kernel style.

Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/nvdimm/btt.c | 39 ++++++++++++++++++---------------------
1 file changed, 18 insertions(+), 21 deletions(-)

diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 6362d96dfc16..9cad4dca6eac 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -229,27 +229,24 @@ static void arena_debugfs_init(struct arena_info *a, struct dentry *parent,
return;
a->debugfs_dir = d;

- debugfs_create_x64("size", S_IRUGO, d, &a->size);
- debugfs_create_x64("external_lba_start", S_IRUGO, d,
- &a->external_lba_start);
- debugfs_create_x32("internal_nlba", S_IRUGO, d, &a->internal_nlba);
- debugfs_create_u32("internal_lbasize", S_IRUGO, d,
- &a->internal_lbasize);
- debugfs_create_x32("external_nlba", S_IRUGO, d, &a->external_nlba);
- debugfs_create_u32("external_lbasize", S_IRUGO, d,
- &a->external_lbasize);
- debugfs_create_u32("nfree", S_IRUGO, d, &a->nfree);
- debugfs_create_u16("version_major", S_IRUGO, d, &a->version_major);
- debugfs_create_u16("version_minor", S_IRUGO, d, &a->version_minor);
- debugfs_create_x64("nextoff", S_IRUGO, d, &a->nextoff);
- debugfs_create_x64("infooff", S_IRUGO, d, &a->infooff);
- debugfs_create_x64("dataoff", S_IRUGO, d, &a->dataoff);
- debugfs_create_x64("mapoff", S_IRUGO, d, &a->mapoff);
- debugfs_create_x64("logoff", S_IRUGO, d, &a->logoff);
- debugfs_create_x64("info2off", S_IRUGO, d, &a->info2off);
- debugfs_create_x32("flags", S_IRUGO, d, &a->flags);
- debugfs_create_u32("log_index_0", S_IRUGO, d, &a->log_index[0]);
- debugfs_create_u32("log_index_1", S_IRUGO, d, &a->log_index[1]);
+ debugfs_create_x64("size", 0444, d, &a->size);
+ debugfs_create_x64("external_lba_start", 0444, d, &a->external_lba_start);
+ debugfs_create_x32("internal_nlba", 0444, d, &a->internal_nlba);
+ debugfs_create_u32("internal_lbasize", 0444, d, &a->internal_lbasize);
+ debugfs_create_x32("external_nlba", 0444, d, &a->external_nlba);
+ debugfs_create_u32("external_lbasize", 0444, d, &a->external_lbasize);
+ debugfs_create_u32("nfree", 0444, d, &a->nfree);
+ debugfs_create_u16("version_major", 0444, d, &a->version_major);
+ debugfs_create_u16("version_minor", 0444, d, &a->version_minor);
+ debugfs_create_x64("nextoff", 0444, d, &a->nextoff);
+ debugfs_create_x64("infooff", 0444, d, &a->infooff);
+ debugfs_create_x64("dataoff", 0444, d, &a->dataoff);
+ debugfs_create_x64("mapoff", 0444, d, &a->mapoff);
+ debugfs_create_x64("logoff", 0444, d, &a->logoff);
+ debugfs_create_x64("info2off", 0444, d, &a->info2off);
+ debugfs_create_x32("flags", 0444, d, &a->flags);
+ debugfs_create_u32("log_index_0", 0444, d, &a->log_index[0]);
+ debugfs_create_u32("log_index_1", 0444, d, &a->log_index[1]);
}

static void btt_debugfs_init(struct btt *btt)
--
2.15.0
\
 
 \ /
  Last update: 2019-09-12 04:56    [W:0.136 / U:8.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site