Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+13 -23
+3 -3
Documentation/filesystems/debugfs.txt
··· 164 164 void __iomem *base; 165 165 }; 166 166 167 - struct dentry *debugfs_create_regset32(const char *name, umode_t mode, 168 - struct dentry *parent, 169 - struct debugfs_regset32 *regset); 167 + debugfs_create_regset32(const char *name, umode_t mode, 168 + struct dentry *parent, 169 + struct debugfs_regset32 *regset); 170 170 171 171 void debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs, 172 172 int nregs, void __iomem *base, char *prefix);
+4 -13
fs/debugfs/file.c
··· 1090 1090 * This function creates a file in debugfs with the given name that reports 1091 1091 * the names and values of a set of 32-bit registers. If the @mode variable 1092 1092 * is so set it can be read from. Writing is not supported. 1093 - * 1094 - * This function will return a pointer to a dentry if it succeeds. This 1095 - * pointer must be passed to the debugfs_remove() function when the file is 1096 - * to be removed (no automatic cleanup happens if your module is unloaded, 1097 - * you are responsible here.) If an error occurs, ERR_PTR(-ERROR) will be 1098 - * returned. 1099 - * 1100 - * If debugfs is not enabled in the kernel, the value ERR_PTR(-ENODEV) will 1101 - * be returned. 1102 1093 */ 1103 - struct dentry *debugfs_create_regset32(const char *name, umode_t mode, 1104 - struct dentry *parent, 1105 - struct debugfs_regset32 *regset) 1094 + void debugfs_create_regset32(const char *name, umode_t mode, 1095 + struct dentry *parent, 1096 + struct debugfs_regset32 *regset) 1106 1097 { 1107 - return debugfs_create_file(name, mode, parent, regset, &fops_regset32); 1098 + debugfs_create_file(name, mode, parent, regset, &fops_regset32); 1108 1099 } 1109 1100 EXPORT_SYMBOL_GPL(debugfs_create_regset32); 1110 1101
+6 -7
include/linux/debugfs.h
··· 127 127 struct dentry *parent, 128 128 struct debugfs_blob_wrapper *blob); 129 129 130 - struct dentry *debugfs_create_regset32(const char *name, umode_t mode, 131 - struct dentry *parent, 132 - struct debugfs_regset32 *regset); 130 + void debugfs_create_regset32(const char *name, umode_t mode, 131 + struct dentry *parent, 132 + struct debugfs_regset32 *regset); 133 133 134 134 void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, 135 135 int nregs, void __iomem *base, char *prefix); ··· 304 304 return ERR_PTR(-ENODEV); 305 305 } 306 306 307 - static inline struct dentry *debugfs_create_regset32(const char *name, 308 - umode_t mode, struct dentry *parent, 309 - struct debugfs_regset32 *regset) 307 + static inline void debugfs_create_regset32(const char *name, umode_t mode, 308 + struct dentry *parent, 309 + struct debugfs_regset32 *regset) 310 310 { 311 - return ERR_PTR(-ENODEV); 312 311 } 313 312 314 313 static inline void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs,