Commit 40d79624 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Tony Luck

EDAC: Make edac_debugfs_create_x*() return void

The return values of edac_debugfs_create_x16() and
edac_debugfs_create_x8() are never checked (as they don't need to be),
so no need to have them return anything, just make the functions return
void instead.

This is done with the goal of being able to change the debugfs_create_x*
functions to also not return a value.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: James Morse <james.morse@arm.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lkml.kernel.org/r/20190611175433.GA5108@kroah.com
parent ff70cacc
...@@ -118,23 +118,23 @@ edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent, ...@@ -118,23 +118,23 @@ edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent,
EXPORT_SYMBOL_GPL(edac_debugfs_create_file); EXPORT_SYMBOL_GPL(edac_debugfs_create_file);
/* Wrapper for debugfs_create_x8() */ /* Wrapper for debugfs_create_x8() */
struct dentry *edac_debugfs_create_x8(const char *name, umode_t mode, void edac_debugfs_create_x8(const char *name, umode_t mode,
struct dentry *parent, u8 *value) struct dentry *parent, u8 *value)
{ {
if (!parent) if (!parent)
parent = edac_debugfs; parent = edac_debugfs;
return debugfs_create_x8(name, mode, parent, value); debugfs_create_x8(name, mode, parent, value);
} }
EXPORT_SYMBOL_GPL(edac_debugfs_create_x8); EXPORT_SYMBOL_GPL(edac_debugfs_create_x8);
/* Wrapper for debugfs_create_x16() */ /* Wrapper for debugfs_create_x16() */
struct dentry *edac_debugfs_create_x16(const char *name, umode_t mode, void edac_debugfs_create_x16(const char *name, umode_t mode,
struct dentry *parent, u16 *value) struct dentry *parent, u16 *value)
{ {
if (!parent) if (!parent)
parent = edac_debugfs; parent = edac_debugfs;
return debugfs_create_x16(name, mode, parent, value); debugfs_create_x16(name, mode, parent, value);
} }
EXPORT_SYMBOL_GPL(edac_debugfs_create_x16); EXPORT_SYMBOL_GPL(edac_debugfs_create_x16);
...@@ -78,10 +78,10 @@ edac_debugfs_create_dir_at(const char *dirname, struct dentry *parent); ...@@ -78,10 +78,10 @@ edac_debugfs_create_dir_at(const char *dirname, struct dentry *parent);
struct dentry * struct dentry *
edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent, edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent,
void *data, const struct file_operations *fops); void *data, const struct file_operations *fops);
struct dentry * void edac_debugfs_create_x8(const char *name, umode_t mode,
edac_debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent, u8 *value); struct dentry *parent, u8 *value);
struct dentry * void edac_debugfs_create_x16(const char *name, umode_t mode,
edac_debugfs_create_x16(const char *name, umode_t mode, struct dentry *parent, u16 *value); struct dentry *parent, u16 *value);
#else #else
static inline void edac_debugfs_init(void) { } static inline void edac_debugfs_init(void) { }
static inline void edac_debugfs_exit(void) { } static inline void edac_debugfs_exit(void) { }
...@@ -92,12 +92,10 @@ edac_debugfs_create_dir_at(const char *dirname, struct dentry *parent) { return ...@@ -92,12 +92,10 @@ edac_debugfs_create_dir_at(const char *dirname, struct dentry *parent) { return
static inline struct dentry * static inline struct dentry *
edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent, edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent,
void *data, const struct file_operations *fops) { return NULL; } void *data, const struct file_operations *fops) { return NULL; }
static inline struct dentry * static inline void edac_debugfs_create_x8(const char *name, umode_t mode,
edac_debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent, u8 *value) { }
struct dentry *parent, u8 *value) { return NULL; } static inline void edac_debugfs_create_x16(const char *name, umode_t mode,
static inline struct dentry * struct dentry *parent, u16 *value) { }
edac_debugfs_create_x16(const char *name, umode_t mode,
struct dentry *parent, u16 *value) { return NULL; }
#endif #endif
/* /*
......
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