No one checks the return value of debugfs_create_u16(), as it's not needed, so make the return value void, so that no one tries to do so in the future.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -99,8 +99,8 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, · 98 unmodified lines | ||
| 99 | 99 | |
| 100 | 100 | void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent, |
| 101 | 101 | u8 *value); |
| 102 | −struct dentry *debugfs_create_u16(const char *name, umode_t mode, | |
| 103 | − struct dentry *parent, u16 *value); | |
| 102 | +void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent, | |
| 103 | + u16 *value); | |
| 104 | 104 | struct dentry *debugfs_create_u32(const char *name, umode_t mode, |
| 105 | 105 | struct dentry *parent, u32 *value); |
| 106 | 106 | struct dentry *debugfs_create_u64(const char *name, umode_t mode, |
| @@ -247,12 +247,8 @@ static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentr · 140 unmodified lines | ||
| 247 | 247 | static inline void debugfs_create_u8(const char *name, umode_t mode, |
| 248 | 248 | struct dentry *parent, u8 *value) { } |
| 249 | 249 | |
| 250 | −static inline struct dentry *debugfs_create_u16(const char *name, umode_t mode, | |
| 251 | − struct dentry *parent, | |
| 252 | − u16 *value) | |
| 253 | −{ | |
| 254 | − return ERR_PTR(-ENODEV); | |
| 255 | −} | |
| 250 | +static inline void debugfs_create_u16(const char *name, umode_t mode, | |
| 251 | + struct dentry *parent, u16 *value) { } | |
| 256 | 252 | |
| 257 | 253 | static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode, |
| 258 | 254 | struct dentry *parent, |