aboutsummaryrefslogtreecommitdiffstats
path: root/fs/debugfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/debugfs')
-rw-r--r--fs/debugfs/file.c22
-rw-r--r--fs/debugfs/inode.c14
2 files changed, 18 insertions, 18 deletions
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 90f76575c056..d5016606fb27 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -95,7 +95,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u8_wo, NULL, debugfs_u8_set, "%llu\n");
95 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 95 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
96 * code. 96 * code.
97 */ 97 */
98struct dentry *debugfs_create_u8(const char *name, mode_t mode, 98struct dentry *debugfs_create_u8(const char *name, umode_t mode,
99 struct dentry *parent, u8 *value) 99 struct dentry *parent, u8 *value)
100{ 100{
101 /* if there are no write bits set, make read only */ 101 /* if there are no write bits set, make read only */
@@ -147,7 +147,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u16_wo, NULL, debugfs_u16_set, "%llu\n");
147 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 147 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
148 * code. 148 * code.
149 */ 149 */
150struct dentry *debugfs_create_u16(const char *name, mode_t mode, 150struct dentry *debugfs_create_u16(const char *name, umode_t mode,
151 struct dentry *parent, u16 *value) 151 struct dentry *parent, u16 *value)
152{ 152{
153 /* if there are no write bits set, make read only */ 153 /* if there are no write bits set, make read only */
@@ -199,7 +199,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u32_wo, NULL, debugfs_u32_set, "%llu\n");
199 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 199 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
200 * code. 200 * code.
201 */ 201 */
202struct dentry *debugfs_create_u32(const char *name, mode_t mode, 202struct dentry *debugfs_create_u32(const char *name, umode_t mode,
203 struct dentry *parent, u32 *value) 203 struct dentry *parent, u32 *value)
204{ 204{
205 /* if there are no write bits set, make read only */ 205 /* if there are no write bits set, make read only */
@@ -252,7 +252,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u64_wo, NULL, debugfs_u64_set, "%llu\n");
252 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 252 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
253 * code. 253 * code.
254 */ 254 */
255struct dentry *debugfs_create_u64(const char *name, mode_t mode, 255struct dentry *debugfs_create_u64(const char *name, umode_t mode,
256 struct dentry *parent, u64 *value) 256 struct dentry *parent, u64 *value)
257{ 257{
258 /* if there are no write bits set, make read only */ 258 /* if there are no write bits set, make read only */
@@ -298,7 +298,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_x64, debugfs_u64_get, debugfs_u64_set, "0x%016llx\n
298 * @value: a pointer to the variable that the file should read to and write 298 * @value: a pointer to the variable that the file should read to and write
299 * from. 299 * from.
300 */ 300 */
301struct dentry *debugfs_create_x8(const char *name, mode_t mode, 301struct dentry *debugfs_create_x8(const char *name, umode_t mode,
302 struct dentry *parent, u8 *value) 302 struct dentry *parent, u8 *value)
303{ 303{
304 /* if there are no write bits set, make read only */ 304 /* if there are no write bits set, make read only */
@@ -322,7 +322,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x8);
322 * @value: a pointer to the variable that the file should read to and write 322 * @value: a pointer to the variable that the file should read to and write
323 * from. 323 * from.
324 */ 324 */
325struct dentry *debugfs_create_x16(const char *name, mode_t mode, 325struct dentry *debugfs_create_x16(const char *name, umode_t mode,
326 struct dentry *parent, u16 *value) 326 struct dentry *parent, u16 *value)
327{ 327{
328 /* if there are no write bits set, make read only */ 328 /* if there are no write bits set, make read only */
@@ -346,7 +346,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x16);
346 * @value: a pointer to the variable that the file should read to and write 346 * @value: a pointer to the variable that the file should read to and write
347 * from. 347 * from.
348 */ 348 */
349struct dentry *debugfs_create_x32(const char *name, mode_t mode, 349struct dentry *debugfs_create_x32(const char *name, umode_t mode,
350 struct dentry *parent, u32 *value) 350 struct dentry *parent, u32 *value)
351{ 351{
352 /* if there are no write bits set, make read only */ 352 /* if there are no write bits set, make read only */
@@ -370,7 +370,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x32);
370 * @value: a pointer to the variable that the file should read to and write 370 * @value: a pointer to the variable that the file should read to and write
371 * from. 371 * from.
372 */ 372 */
373struct dentry *debugfs_create_x64(const char *name, mode_t mode, 373struct dentry *debugfs_create_x64(const char *name, umode_t mode,
374 struct dentry *parent, u64 *value) 374 struct dentry *parent, u64 *value)
375{ 375{
376 return debugfs_create_file(name, mode, parent, value, &fops_x64); 376 return debugfs_create_file(name, mode, parent, value, &fops_x64);
@@ -401,7 +401,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_size_t, debugfs_size_t_get, debugfs_size_t_set,
401 * @value: a pointer to the variable that the file should read to and write 401 * @value: a pointer to the variable that the file should read to and write
402 * from. 402 * from.
403 */ 403 */
404struct dentry *debugfs_create_size_t(const char *name, mode_t mode, 404struct dentry *debugfs_create_size_t(const char *name, umode_t mode,
405 struct dentry *parent, size_t *value) 405 struct dentry *parent, size_t *value)
406{ 406{
407 return debugfs_create_file(name, mode, parent, value, &fops_size_t); 407 return debugfs_create_file(name, mode, parent, value, &fops_size_t);
@@ -473,7 +473,7 @@ static const struct file_operations fops_bool = {
473 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 473 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
474 * code. 474 * code.
475 */ 475 */
476struct dentry *debugfs_create_bool(const char *name, mode_t mode, 476struct dentry *debugfs_create_bool(const char *name, umode_t mode,
477 struct dentry *parent, u32 *value) 477 struct dentry *parent, u32 *value)
478{ 478{
479 return debugfs_create_file(name, mode, parent, value, &fops_bool); 479 return debugfs_create_file(name, mode, parent, value, &fops_bool);
@@ -518,7 +518,7 @@ static const struct file_operations fops_blob = {
518 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling 518 * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
519 * code. 519 * code.
520 */ 520 */
521struct dentry *debugfs_create_blob(const char *name, mode_t mode, 521struct dentry *debugfs_create_blob(const char *name, umode_t mode,
522 struct dentry *parent, 522 struct dentry *parent,
523 struct debugfs_blob_wrapper *blob) 523 struct debugfs_blob_wrapper *blob)
524{ 524{
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index c9dc08d0c100..956d5ddddf6e 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -30,7 +30,7 @@ static struct vfsmount *debugfs_mount;
30static int debugfs_mount_count; 30static int debugfs_mount_count;
31static bool debugfs_registered; 31static bool debugfs_registered;
32 32
33static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t dev, 33static struct inode *debugfs_get_inode(struct super_block *sb, umode_t mode, dev_t dev,
34 void *data, const struct file_operations *fops) 34 void *data, const struct file_operations *fops)
35 35
36{ 36{
@@ -69,7 +69,7 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d
69 69
70/* SMP-safe */ 70/* SMP-safe */
71static int debugfs_mknod(struct inode *dir, struct dentry *dentry, 71static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
72 int mode, dev_t dev, void *data, 72 umode_t mode, dev_t dev, void *data,
73 const struct file_operations *fops) 73 const struct file_operations *fops)
74{ 74{
75 struct inode *inode; 75 struct inode *inode;
@@ -87,7 +87,7 @@ static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
87 return error; 87 return error;
88} 88}
89 89
90static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode, 90static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode,
91 void *data, const struct file_operations *fops) 91 void *data, const struct file_operations *fops)
92{ 92{
93 int res; 93 int res;
@@ -101,14 +101,14 @@ static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode,
101 return res; 101 return res;
102} 102}
103 103
104static int debugfs_link(struct inode *dir, struct dentry *dentry, int mode, 104static int debugfs_link(struct inode *dir, struct dentry *dentry, umode_t mode,
105 void *data, const struct file_operations *fops) 105 void *data, const struct file_operations *fops)
106{ 106{
107 mode = (mode & S_IALLUGO) | S_IFLNK; 107 mode = (mode & S_IALLUGO) | S_IFLNK;
108 return debugfs_mknod(dir, dentry, mode, 0, data, fops); 108 return debugfs_mknod(dir, dentry, mode, 0, data, fops);
109} 109}
110 110
111static int debugfs_create(struct inode *dir, struct dentry *dentry, int mode, 111static int debugfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
112 void *data, const struct file_operations *fops) 112 void *data, const struct file_operations *fops)
113{ 113{
114 int res; 114 int res;
@@ -146,7 +146,7 @@ static struct file_system_type debug_fs_type = {
146 .kill_sb = kill_litter_super, 146 .kill_sb = kill_litter_super,
147}; 147};
148 148
149static int debugfs_create_by_name(const char *name, mode_t mode, 149static int debugfs_create_by_name(const char *name, umode_t mode,
150 struct dentry *parent, 150 struct dentry *parent,
151 struct dentry **dentry, 151 struct dentry **dentry,
152 void *data, 152 void *data,
@@ -214,7 +214,7 @@ static int debugfs_create_by_name(const char *name, mode_t mode,
214 * If debugfs is not enabled in the kernel, the value -%ENODEV will be 214 * If debugfs is not enabled in the kernel, the value -%ENODEV will be
215 * returned. 215 * returned.
216 */ 216 */
217struct dentry *debugfs_create_file(const char *name, mode_t mode, 217struct dentry *debugfs_create_file(const char *name, umode_t mode,
218 struct dentry *parent, void *data, 218 struct dentry *parent, void *data,
219 const struct file_operations *fops) 219 const struct file_operations *fops)
220{ 220{