Commit ae91c925 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

debugfs: remove return value of debugfs_create_regset32()

No one checks the return value of debugfs_create_regset32(), 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/20191122104453.GA2017837@kroah.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bb6d3fb3
...@@ -164,9 +164,9 @@ file. ...@@ -164,9 +164,9 @@ file.
void __iomem *base; void __iomem *base;
}; };
struct dentry *debugfs_create_regset32(const char *name, umode_t mode, debugfs_create_regset32(const char *name, umode_t mode,
struct dentry *parent, struct dentry *parent,
struct debugfs_regset32 *regset); struct debugfs_regset32 *regset);
void debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs, void debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs,
int nregs, void __iomem *base, char *prefix); int nregs, void __iomem *base, char *prefix);
......
...@@ -1090,21 +1090,12 @@ static const struct file_operations fops_regset32 = { ...@@ -1090,21 +1090,12 @@ static const struct file_operations fops_regset32 = {
* This function creates a file in debugfs with the given name that reports * This function creates a file in debugfs with the given name that reports
* the names and values of a set of 32-bit registers. If the @mode variable * the names and values of a set of 32-bit registers. If the @mode variable
* is so set it can be read from. Writing is not supported. * is so set it can be read from. Writing is not supported.
*
* 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 ERR_PTR(-ENODEV) will
* be returned.
*/ */
struct dentry *debugfs_create_regset32(const char *name, umode_t mode, void debugfs_create_regset32(const char *name, umode_t mode,
struct dentry *parent, struct dentry *parent,
struct debugfs_regset32 *regset) struct debugfs_regset32 *regset)
{ {
return debugfs_create_file(name, mode, parent, regset, &fops_regset32); debugfs_create_file(name, mode, parent, regset, &fops_regset32);
} }
EXPORT_SYMBOL_GPL(debugfs_create_regset32); EXPORT_SYMBOL_GPL(debugfs_create_regset32);
......
...@@ -127,9 +127,9 @@ struct dentry *debugfs_create_blob(const char *name, umode_t mode, ...@@ -127,9 +127,9 @@ struct dentry *debugfs_create_blob(const char *name, umode_t mode,
struct dentry *parent, struct dentry *parent,
struct debugfs_blob_wrapper *blob); struct debugfs_blob_wrapper *blob);
struct dentry *debugfs_create_regset32(const char *name, umode_t mode, void debugfs_create_regset32(const char *name, umode_t mode,
struct dentry *parent, struct dentry *parent,
struct debugfs_regset32 *regset); struct debugfs_regset32 *regset);
void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs,
int nregs, void __iomem *base, char *prefix); int nregs, void __iomem *base, char *prefix);
...@@ -304,11 +304,10 @@ static inline struct dentry *debugfs_create_blob(const char *name, umode_t mode, ...@@ -304,11 +304,10 @@ static inline struct dentry *debugfs_create_blob(const char *name, umode_t mode,
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
} }
static inline struct dentry *debugfs_create_regset32(const char *name, static inline void debugfs_create_regset32(const char *name, umode_t mode,
umode_t mode, struct dentry *parent, struct dentry *parent,
struct debugfs_regset32 *regset) struct debugfs_regset32 *regset)
{ {
return ERR_PTR(-ENODEV);
} }
static inline void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, static inline void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs,
......
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