Commit 526ee72d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

debugfs: remove return value of debugfs_create_file_size()

No one checks the return value of debugfs_create_file_size, as it's not
needed, so make the return value void, so that no one tries to do so in
the future.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200309163640.237984-1-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 275678e7
...@@ -55,7 +55,7 @@ missing. ...@@ -55,7 +55,7 @@ missing.
Create a file with an initial size, the following function can be used Create a file with an initial size, the following function can be used
instead: instead:
struct dentry *debugfs_create_file_size(const char *name, umode_t mode, void debugfs_create_file_size(const char *name, umode_t mode,
struct dentry *parent, void *data, struct dentry *parent, void *data,
const struct file_operations *fops, const struct file_operations *fops,
loff_t file_size); loff_t file_size);
......
...@@ -501,17 +501,8 @@ EXPORT_SYMBOL_GPL(debugfs_create_file_unsafe); ...@@ -501,17 +501,8 @@ EXPORT_SYMBOL_GPL(debugfs_create_file_unsafe);
* wide range of flexibility in creating a file, or a directory (if you want * wide range of flexibility in creating a file, or a directory (if you want
* to create a directory, the debugfs_create_dir() function is * to create a directory, the debugfs_create_dir() function is
* recommended to be used instead.) * recommended to be used instead.)
*
* This function will return a pointer to a dentry if it succeeds. This
* pointer must be passed to the debugfs_remove() function when the file is
* to be removed (no automatic cleanup happens if your module is unloaded,
* you are responsible here.) If an error occurs, ERR_PTR(-ERROR) will be
* returned.
*
* If debugfs is not enabled in the kernel, the value -%ENODEV will be
* returned.
*/ */
struct dentry *debugfs_create_file_size(const char *name, umode_t mode, void debugfs_create_file_size(const char *name, umode_t mode,
struct dentry *parent, void *data, struct dentry *parent, void *data,
const struct file_operations *fops, const struct file_operations *fops,
loff_t file_size) loff_t file_size)
...@@ -520,7 +511,6 @@ struct dentry *debugfs_create_file_size(const char *name, umode_t mode, ...@@ -520,7 +511,6 @@ struct dentry *debugfs_create_file_size(const char *name, umode_t mode,
if (de) if (de)
d_inode(de)->i_size = file_size; d_inode(de)->i_size = file_size;
return de;
} }
EXPORT_SYMBOL_GPL(debugfs_create_file_size); EXPORT_SYMBOL_GPL(debugfs_create_file_size);
......
...@@ -67,7 +67,7 @@ struct dentry *debugfs_create_file_unsafe(const char *name, umode_t mode, ...@@ -67,7 +67,7 @@ struct dentry *debugfs_create_file_unsafe(const char *name, umode_t mode,
struct dentry *parent, void *data, struct dentry *parent, void *data,
const struct file_operations *fops); const struct file_operations *fops);
struct dentry *debugfs_create_file_size(const char *name, umode_t mode, void debugfs_create_file_size(const char *name, umode_t mode,
struct dentry *parent, void *data, struct dentry *parent, void *data,
const struct file_operations *fops, const struct file_operations *fops,
loff_t file_size); loff_t file_size);
...@@ -181,13 +181,11 @@ static inline struct dentry *debugfs_create_file_unsafe(const char *name, ...@@ -181,13 +181,11 @@ static inline struct dentry *debugfs_create_file_unsafe(const char *name,
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
} }
static inline struct dentry *debugfs_create_file_size(const char *name, umode_t mode, static inline void debugfs_create_file_size(const char *name, umode_t mode,
struct dentry *parent, void *data, struct dentry *parent, void *data,
const struct file_operations *fops, const struct file_operations *fops,
loff_t file_size) loff_t file_size)
{ { }
return ERR_PTR(-ENODEV);
}
static inline struct dentry *debugfs_create_dir(const char *name, static inline struct dentry *debugfs_create_dir(const char *name,
struct dentry *parent) struct dentry *parent)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment