Skip to content

Commit dd75574

Browse files
committed
Fix errors raised by missing-prototypes
The recent upstream(commit 0fcb708) in the Linux kernel globally enforce function prototype checks. This means that it's crucial for each function to have a declaration to validate that both the caller and the callee expect the same argument types. Failure to comply with this requirement may result in real bugs due to mismatched prototypes. Therefore, in this commit, we need to add function prototypes to the header files or declare functions with static to ensure compatibility with these changes.
1 parent 0f28083 commit dd75574

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

simplefs.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,19 @@ struct simplefs_dir_block {
108108

109109
/* superblock functions */
110110
int simplefs_fill_super(struct super_block *sb, void *data, int silent);
111+
void simplefs_kill_sb(struct super_block *sb);
111112

112113
/* inode functions */
113114
int simplefs_init_inode_cache(void);
114115
void simplefs_destroy_inode_cache(void);
115116
struct inode *simplefs_iget(struct super_block *sb, unsigned long ino);
116117

118+
/* dentry function */
119+
struct dentry *simplefs_mount(struct file_system_type *fs_type,
120+
int flags,
121+
const char *dev_name,
122+
void *data);
123+
117124
/* file functions */
118125
extern const struct file_operations simplefs_file_ops;
119126
extern const struct file_operations simplefs_dir_ops;

0 commit comments

Comments
 (0)