debugfs: remove return value of debugfs_create_devm_seqfile()

No one checks the return value of debugfs_create_devm_seqfile(), as it's
not needed, so make the return value void, so that no one tries to do so
in the future.

Link: https://lore.kernel.org/r/20201023131037.2500765-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2020-10-23 15:10:37 +02:00
parent 3650b228f8
commit 0d519cbf38
3 changed files with 16 additions and 19 deletions

View file

@ -199,7 +199,7 @@ of its elements. Note: Once array is created its size can not be changed.
There is a helper function to create device related seq_file:: There is a helper function to create device related seq_file::
struct dentry *debugfs_create_devm_seqfile(struct device *dev, void debugfs_create_devm_seqfile(struct device *dev,
const char *name, const char *name,
struct dentry *parent, struct dentry *parent,
int (*read_fn)(struct seq_file *s, int (*read_fn)(struct seq_file *s,

View file

@ -1127,24 +1127,23 @@ static const struct file_operations debugfs_devm_entry_ops = {
* file will be created in the root of the debugfs filesystem. * file will be created in the root of the debugfs filesystem.
* @read_fn: function pointer called to print the seq_file content. * @read_fn: function pointer called to print the seq_file content.
*/ */
struct dentry *debugfs_create_devm_seqfile(struct device *dev, const char *name, void debugfs_create_devm_seqfile(struct device *dev, const char *name,
struct dentry *parent, struct dentry *parent,
int (*read_fn)(struct seq_file *s, int (*read_fn)(struct seq_file *s, void *data))
void *data))
{ {
struct debugfs_devm_entry *entry; struct debugfs_devm_entry *entry;
if (IS_ERR(parent)) if (IS_ERR(parent))
return ERR_PTR(-ENOENT); return;
entry = devm_kzalloc(dev, sizeof(*entry), GFP_KERNEL); entry = devm_kzalloc(dev, sizeof(*entry), GFP_KERNEL);
if (!entry) if (!entry)
return ERR_PTR(-ENOMEM); return;
entry->read = read_fn; entry->read = read_fn;
entry->dev = dev; entry->dev = dev;
return debugfs_create_file(name, S_IRUGO, parent, entry, debugfs_create_file(name, S_IRUGO, parent, entry,
&debugfs_devm_entry_ops); &debugfs_devm_entry_ops);
} }
EXPORT_SYMBOL_GPL(debugfs_create_devm_seqfile); EXPORT_SYMBOL_GPL(debugfs_create_devm_seqfile);

View file

@ -144,10 +144,9 @@ void debugfs_create_u32_array(const char *name, umode_t mode,
struct dentry *parent, struct dentry *parent,
struct debugfs_u32_array *array); struct debugfs_u32_array *array);
struct dentry *debugfs_create_devm_seqfile(struct device *dev, const char *name, void debugfs_create_devm_seqfile(struct device *dev, const char *name,
struct dentry *parent, struct dentry *parent,
int (*read_fn)(struct seq_file *s, int (*read_fn)(struct seq_file *s, void *data));
void *data));
bool debugfs_initialized(void); bool debugfs_initialized(void);
@ -327,13 +326,12 @@ static inline void debugfs_create_u32_array(const char *name, umode_t mode,
{ {
} }
static inline struct dentry *debugfs_create_devm_seqfile(struct device *dev, static inline void debugfs_create_devm_seqfile(struct device *dev,
const char *name, const char *name,
struct dentry *parent, struct dentry *parent,
int (*read_fn)(struct seq_file *s, int (*read_fn)(struct seq_file *s,
void *data)) void *data))
{ {
return ERR_PTR(-ENODEV);
} }
static inline ssize_t debugfs_read_file_bool(struct file *file, static inline ssize_t debugfs_read_file_bool(struct file *file,