]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
EDAC: Make edac_debugfs_create_x*() return void
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 17:54:33 +0000 (19:54 +0200)
committerTony Luck <tony.luck@intel.com>
Thu, 20 Jun 2019 18:44:36 +0000 (11:44 -0700)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Borislav 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
drivers/edac/debugfs.c
drivers/edac/edac_module.h

index 6b8e484db851235616416f8eb79f70ba6079587f..1f943599a8acc18d4c8eea04dbb3aa17c732c98d 100644 (file)
@@ -118,23 +118,23 @@ edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent,
 EXPORT_SYMBOL_GPL(edac_debugfs_create_file);
 
 /* Wrapper for debugfs_create_x8() */
-struct dentry *edac_debugfs_create_x8(const char *name, umode_t mode,
-                                      struct dentry *parent, u8 *value)
+void edac_debugfs_create_x8(const char *name, umode_t mode,
+                           struct dentry *parent, u8 *value)
 {
        if (!parent)
                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);
 
 /* Wrapper for debugfs_create_x16() */
-struct dentry *edac_debugfs_create_x16(const char *name, umode_t mode,
-                                      struct dentry *parent, u16 *value)
+void edac_debugfs_create_x16(const char *name, umode_t mode,
+                            struct dentry *parent, u16 *value)
 {
        if (!parent)
                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);
index dd7d0b509aa3fafc01612e6c4749810df1dad907..bc4b806dc9ccd0488f04a1d01274eff0aba11aee 100644 (file)
@@ -78,10 +78,10 @@ edac_debugfs_create_dir_at(const char *dirname, struct dentry *parent);
 struct dentry *
 edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent,
                         void *data, const struct file_operations *fops);
-struct dentry *
-edac_debugfs_create_x8(const char *name, umode_t mode, struct dentry *parent, u8 *value);
-struct dentry *
-edac_debugfs_create_x16(const char *name, umode_t mode, struct dentry *parent, u16 *value);
+void edac_debugfs_create_x8(const char *name, umode_t mode,
+                           struct dentry *parent, u8 *value);
+void edac_debugfs_create_x16(const char *name, umode_t mode,
+                            struct dentry *parent, u16 *value);
 #else
 static inline void edac_debugfs_init(void)                                     { }
 static inline void edac_debugfs_exit(void)                                     { }
@@ -92,12 +92,10 @@ edac_debugfs_create_dir_at(const char *dirname, struct dentry *parent)              { return
 static inline struct dentry *
 edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent,
                         void *data, const struct file_operations *fops)        { return NULL; }
-static inline struct dentry *
-edac_debugfs_create_x8(const char *name, umode_t mode,
-                      struct dentry *parent, u8 *value)                        { return NULL; }
-static inline struct dentry *
-edac_debugfs_create_x16(const char *name, umode_t mode,
-                      struct dentry *parent, u16 *value)                       { return NULL; }
+static inline void edac_debugfs_create_x8(const char *name, umode_t mode,
+                                         struct dentry *parent, u8 *value)     { }
+static inline void edac_debugfs_create_x16(const char *name, umode_t mode,
+                                          struct dentry *parent, u16 *value)   { }
 #endif
 
 /*